RDF-TrineX-Functions
view release on metacpan or search on metacpan
t/02parse_and_serialise.t view on Meta::CPAN
use RDF::Trine;
use RDF::TrineX::Functions
iri => {},
parse => {},
serialize => { -type => RDF::Trine::Serializer::NTriples::Canonical->new };
my %in;
($in{filename} = __FILE__) =~ s/t$/nt/;
open $in{filehandle}, '<', $in{filename} or die "Could not open $in{filename}: $!";
$in{data} = do { local (@ARGV, $/) = $in{filename}; <> };
open $in{datahandle}, '<', \($in{data});
foreach my $source (qw(data datahandle filename filehandle))
{
my $model = parse(
$in{$source},
as => 'NTriples',
base => 'http://example.net/',
);
( run in 0.498 second using v1.01-cache-2.11-cpan-49f99fa48dc )