[libmodule-install-rdf-perl] 07/34: support Pretdsl
Jonas Smedegaard
js at alioth.debian.org
Fri Aug 9 14:36:16 UTC 2013
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository libmodule-install-rdf-perl.
commit 37e52c51ec54988a9f237dd669675b6dfa279a7d
Author: Toby Inkster <mail at tobyinkster.co.uk>
Date: Wed Jul 4 13:54:08 2012 +0100
support Pretdsl
--HG--
branch : Module-Install-RDF
---
lib/Module/Install/Admin/RDF.pm | 26 ++++++++++++++++++++------
lib/Module/Install/RDF.pm | 2 +-
2 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/lib/Module/Install/Admin/RDF.pm b/lib/Module/Install/Admin/RDF.pm
index dd90b01..8960271 100644
--- a/lib/Module/Install/Admin/RDF.pm
+++ b/lib/Module/Install/Admin/RDF.pm
@@ -6,9 +6,10 @@ use strict;
use Object::ID;
use RDF::Trine qw[];
+use RDF::TrineX::Parser::Pretdsl qw[];
use URI::file qw[];
-our $VERSION = '0.004';
+our $VERSION = '0.005';
my $Model = {};
@@ -20,20 +21,33 @@ sub rdf_metadata
return $Model->{$addr} if defined $Model->{$addr};
my $model = $Model->{$addr} = RDF::Trine::Model->new;
- my $turtle = RDF::Trine::Parser->new('Turtle');
+ my $parser;
+
while (<meta/*.{ttl,turtle,nt}>)
{
my $iri = URI::file->new_abs($_);
- $turtle->parse_file_into_model("$iri", $_, $model);
+ $parser ||= RDF::Trine::Parser->new('Turtle');
+ $parser->parse_file_into_model("$iri", $_, $model);
}
+
+ $parser = undef;
- my $rdfxml = RDF::Trine::Parser->new('RDFXML');
while (<meta/*.{rdf,rdfxml,rdfx}>)
{
my $iri = URI::file->new_abs($_);
- $rdfxml->parse_file_into_model("$iri", $_, $model);
+ $parser ||= RDF::Trine::Parser->new('RDFXML');
+ $parser->parse_file_into_model("$iri", $_, $model);
}
-
+
+ $parser = undef;
+
+ while (<meta/*.{pret,pretdsl}>)
+ {
+ my $iri = URI::file->new_abs($_);
+ $parser ||= RDF::TrineX::Parser::Pretdsl->new;
+ $parser->parse_file_into_model("$iri", $_, $model);
+ }
+
return $model;
}
diff --git a/lib/Module/Install/RDF.pm b/lib/Module/Install/RDF.pm
index 39d0892..940af92 100644
--- a/lib/Module/Install/RDF.pm
+++ b/lib/Module/Install/RDF.pm
@@ -4,7 +4,7 @@ use 5.008;
use base qw(Module::Install::Base);
use strict;
-our $VERSION = '0.004';
+our $VERSION = '0.005';
our $AUTHOR_ONLY = 1;
sub rdf_metadata
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmodule-install-rdf-perl.git
More information about the Pkg-perl-cvs-commits
mailing list