diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/URI/WithBase.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/URI/WithBase.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Master/tlpkg/tlperl/lib/URI/WithBase.pm b/Master/tlpkg/tlperl/lib/URI/WithBase.pm index 4300a2a60ae..943b7b533a7 100644 --- a/Master/tlpkg/tlperl/lib/URI/WithBase.pm +++ b/Master/tlpkg/tlperl/lib/URI/WithBase.pm @@ -1,10 +1,12 @@ package URI::WithBase; use strict; -use vars qw($AUTOLOAD $VERSION); +use warnings; + use URI; +use Scalar::Util 'blessed'; -$VERSION = "2.20"; +our $VERSION = "2.20"; use overload '""' => "as_string", fallback => 1; @@ -14,7 +16,7 @@ sub new { my($class, $uri, $base) = @_; my $ibase = $base; - if ($base && ref($base) && UNIVERSAL::isa($base, __PACKAGE__)) { + if ($base && blessed($base) && $base->isa(__PACKAGE__)) { $base = $base->abs; $ibase = $base->[0]; } @@ -38,10 +40,11 @@ sub _init sub eq { my($self, $other) = @_; - $other = $other->[0] if UNIVERSAL::isa($other, __PACKAGE__); + $other = $other->[0] if blessed($other) and $other->isa(__PACKAGE__); $self->[0]->eq($other); } +our $AUTOLOAD; sub AUTOLOAD { my $self = shift; |