From: Nick Ing-Simmons Date: Tue, 1 May 2001 19:09:21 +0000 (+0000) Subject: Fix for base.pm clobbering $VERSION X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7668bf4dc1ed94a756f3bd5e7cb95caf14c88e1f;p=p5sagit%2Fp5-mst-13.2.git Fix for base.pm clobbering $VERSION p4raw-id: //depot/perlio@9936 --- diff --git a/lib/base.pm b/lib/base.pm index 8db7d72..681e8f0 100644 --- a/lib/base.pm +++ b/lib/base.pm @@ -56,7 +56,7 @@ sub import { next if $pkg->isa($base); push @{"$pkg\::ISA"}, $base; my $vglob; - unless ($vglob = ${"$base\::"}{VERSION} and $vglob{SCALAR}) { + unless (${*{"$base\::VERSION"}{SCALAR}}) { eval "require $base"; # Only ignore "Can't locate" errors from our eval require. # Other fatal errors (syntax etc) must be reported. @@ -68,7 +68,7 @@ sub import { "which defines that package first.)"); } ${"$base\::VERSION"} = "-1, set by base.pm" - unless $vglob = ${"$base\::"}{VERSION} and $vglob{SCALAR}; + unless ${*{"$base\::VERSION"}{SCALAR}}; } # A simple test like (defined %{"$base\::FIELDS"}) will