Commit 2badbeca authored by Jonas Smedegaard's avatar Jonas Smedegaard

Load prefixfile from same dir as infile. Use more recent Path::Tiny (needed for resolving samedir).

parent 541cebbb
......@@ -24,7 +24,7 @@ use Carp::Always; # http://search.cpan.org/~ferreira/Carp-Always-0.13/lib/Carp/A
# stronger than $Carp::Verbose = 1;
use RDF::Trine;
use RDF::Query;
use Path::Tiny 0.054;
use Path::Tiny 0.058;
use FindBin;
use lib "$FindBin::Bin/../lib"; # Curie is my own module, not yet on CPAN
use RDF::Prefixes::Curie;
......@@ -158,7 +158,7 @@ pod2usage("$0: Missing input filename.\n")
my $infile = path($ARGV[0]);
my $outfile = path( $ARGV[1] || $infile->basename('.ttl') . '.puml' );
my $prefixfile = path('prefixes.ttl');
my $prefixfile = $infile->sibling('prefixes.ttl');
my $prefixes = $prefixfile->exists ? $prefixfile->slurp_utf8 : "";
my $data = $infile->slurp_utf8;
......
  • But then $outfile should also be a sibling, right?

    Edited by Vladimir Alexiev
  • I disagree: I find it sensible that input files are tied together but output file is tied to current working directory.

    Typical (to me) use case: Source data is in a read-only location, so I process it from another readable location, expecting output to be spewed to where I stand.

    Edited by Jonas Smedegaard
  • Guess I can live with that.

    Please see https://github.com/VladimirAlexiev/rdf2rml#near-term "batch" for another promising output "model" (I also cited it in another comment somewhere here)

Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment