/usr/share/doc/librdf-trine-perl/examples/bin/graph.pl is in librdf-trine-perl 1.019-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #!/usr/bin/env perl
use strict;
use warnings;
use RDF::Trine;
use GraphViz;
use File::Spec;
my $model = RDF::Trine::Model->temporary_model;
foreach my $file (@ARGV) {
my $pclass = RDF::Trine::Parser->guess_parser_by_filename($file) || 'RDF::Trine::Parser::RDFXML';
my $p = $pclass->new;
open(my $fh, '<', $file) or die $!;
my $base = 'file://' . File::Spec->rel2abs($file);
$p->parse_file_into_model( $base, $fh, $model );
}
my $g = $model->as_graphviz;
print $g->as_png;
|