Commit 06fab98c authored by Jonas Smedegaard's avatar Jonas Smedegaard

Use warnings and autodie.

parent 50370c35
......@@ -15,6 +15,9 @@
# if 0;
use strict;
use warnings;
use autodie;
use Encode;
use Carp::Always; # http://search.cpan.org/~ferreira/Carp-Always-0.13/lib/Carp/Always.pm
  • Is this then needed, given warnings and autodie?

  • Sorry, I don't understand your question.

    Seems you are asking if above is needed when above is applied - gotta be something else you meant to ask (something not circular).

  • I think I don't need Carp::Always. It'll show a stack trace on every die but who needs this for a missing file?

  • Quoting Vladimir Alexiev (2018-12-07 11:56:29)

    Vladimir Alexiev commented on a discussion on bin/rdfpuml.pl:

    if 0;

    use strict; +use warnings; +use autodie; + use Encode; use Carp::Always; # http://search.cpan.org/~ferreira/Carp-Always-0.13/lib/Carp/Always.pm

    I think I don't need Carp::Always. It'll show a stack trace on every die but who needs this for a missing file?

    Sorry, I am not sure I understand your question.

    Are you sceptical about this commit, or are you just inspired by it and derive into related but different issue? If the latter, can we please discuss that somewhere else than here? E.g. plain email or an issue tracker (either here if ok with you, or at Github)?

    signature.asc

  • Quoting Vladimir Alexiev (2018-12-07 11:56:29)

    Vladimir Alexiev commented on a discussion on bin/rdfpuml.pl:

    if 0;

    use strict; +use warnings; +use autodie; + use Encode; use Carp::Always; # http://search.cpan.org/~ferreira/Carp-Always-0.13/lib/Carp/Always.pm

    I think I don't need Carp::Always. It'll show a stack trace on every die but who needs this for a missing file?

    Sorry, I am not sure I understand your question.

    Are you sceptical about this commit, or are you just inspired by it and derive into related but different issue? If the latter, can we please discuss that somewhere else than here? E.g. plain email or an issue tracker (either here if ok with you, or at Github)?

    signature.asc

Please register or sign in to reply
# stronger than $Carp::Verbose = 1;
......@@ -99,12 +102,12 @@ my $prefixes = -e "prefixes.ttl" ? slurp("prefixes.ttl") : "";
my $file = slurp("$fname.ttl");
my $turtle = decode_utf8 "$PREFIXES_TURTLE\n$prefixes\n$file";
my $prefixes_all = decode_utf8 "$PREFIXES_TURTLE\n$prefixes";
open (STDOUT, ">:encoding(UTF-8)", "$fname.puml") or die "can't create $fname.puml: $!\n";
open (STDOUT, ">:encoding(UTF-8)", "$fname.puml");
binmode STDERR, ":encoding(UTF-8)";
#print STDERR $turtle; die;
my $store = RDF::Trine::Store::Memory->new();
my $model = RDF::Trine::Model->new($store) or die "can't create model: $!\n";
my $model = RDF::Trine::Model->new($store);
my $parser = RDF::Trine::Parser->new('turtle');
$parser->parse_into_model (undef, $turtle, $model);
my $map = RDF::Prefixes::Curie->new ($prefixes_all);
......
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