summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas <dr@jones.dk>2013-07-19 17:41:31 +0200
committerJonas <dr@jones.dk>2013-07-19 17:41:31 +0200
commit10a459833a060fe6a55c56613256688ddbc96a78 (patch)
tree5352b4ee7c09384167a8524bb4529a8935618465
parent0806f2aef343a2892d295d8772199dad2a6427c6 (diff)
Fix punycode/IRI issue: Explicitly use recent RDF::Trine, instead of URI reinitializing workaround.
-rwxr-xr-xbin/rdf2events6
1 files changed, 2 insertions, 4 deletions
diff --git a/bin/rdf2events b/bin/rdf2events
index 865afe9..c8ed4da 100755
--- a/bin/rdf2events
+++ b/bin/rdf2events
@@ -25,7 +25,7 @@ use DateTimeX::Easy;
use DateTime::Format::W3CDTF;
use Carp;
use Try::Tiny;
-use URI;
+use RDF::Trine 1.006; # we need proper IRI and punycode URI support
use RDF::Query;
use RDF::TrineX::Functions qw[curie model parse];
use HTML::HTML5::Builder qw[:standard];
@@ -202,12 +202,10 @@ sub objectdescribe {
return thingdescribe( $title, $thing->literal_value, node2uri($uri) );
}
-# TODO: report as bug against RDF::Trine RDF::Trine::Node->uri_value not utf8
-# i.e. choking on punycode if fed to HTML::HTML5::Builder
sub node2uri {
my $node = shift;
- return ($node) ? URI->new($node->uri_value)->as_string : undef;
+ return ($node) ? $node->uri_value : undef;
}
1;