[SCM] librdf-ns-perl Debian packaging branch, master, updated. debian/20130208-1-22-g47de138
Jakob Voss
voss at gbv.de
Fri Apr 19 13:28:41 UTC 2013
The following commit has been merged in the master branch:
commit 9933b2e82dd21118b2f0ac4e490742ba4df98fe0
Author: Jakob Voss <voss at gbv.de>
Date: Thu Nov 24 11:20:42 2011 +0100
no common method names but perl<5.10.0
diff --git a/lib/RDF/NS.pm b/lib/RDF/NS.pm
index 687415d..69334d1 100644
--- a/lib/RDF/NS.pm
+++ b/lib/RDF/NS.pm
@@ -5,7 +5,6 @@ package RDF::NS;
use Scalar::Util qw(blessed);
use File::ShareDir;
-use 5.10.0;
our $AUTOLOAD;
@@ -28,8 +27,8 @@ sub LOAD {
chomp;
next if /^#/;
my ($prefix, $namespace) = split "\t", $_;
- if ( $prefix =~ /^(isa|can|new)$/ ) {
- warn "Cannot support prefix $prefix!" if $warn;
+ if ( $prefix =~ /^(isa|can|new|uri)$/ ) {
+ warn "Cannot support prefix '$prefix'" if $warn;
next;
} elsif ( $prefix =~ /^[a-z][a-z0-9]*$/ ) {
if ( $namespace =~ /^[a-z][a-z0-9]*:[^"<>]*$/ ) {
@@ -86,7 +85,7 @@ sub GET {
sub URI {
my $self = shift;
return unless shift =~ /^([a-z][a-z0-9]*)?([:_]([^:]+))?$/;
- my $ns = $self->{$1 // ''};
+ my $ns = $self->{ defined $1 ? $1 : '' };
return unless defined $ns;
return $self->GET($ns) unless $3;
return $self->GET($ns.$3);
@@ -94,9 +93,9 @@ sub URI {
sub AUTOLOAD {
my $self = shift;
- return unless $AUTOLOAD =~ /^.*::([a-z][a-z0-9]*)_([^:]+))?$/;
+ return unless $AUTOLOAD =~ /^.*::([a-z][a-z0-9]*)(_([^:]+))?$/;
my $ns = $self->{$1} or return;
- my $local = $3 // shift;
+ my $local = defined $3 ? $3 : shift;
return $self->GET($ns) unless defined $local;
return $self->GET($ns.$local);
}
--
librdf-ns-perl Debian packaging
More information about the Pkg-perl-cvs-commits
mailing list