X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fbase.pm;h=c6d8cca4a78fad00ee3197c3ba60ddc1dce448b0;hb=ba690e3299357f01ba3a8cb5887c44f0790a0c35;hp=d055129fb0e934977ddab74529a1543893b29076;hpb=509eaf621fa8b0d040345ae3c00ae8ac8255406e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/base.pm b/lib/base.pm index d055129..c6d8cca 100644 --- a/lib/base.pm +++ b/lib/base.pm @@ -44,8 +44,8 @@ L package base; -use 5.005_64; -our $VERSION = "1.01"; +use 5.006_001; +our $VERSION = "1.02"; sub import { my $class = shift; @@ -55,7 +55,8 @@ sub import { foreach my $base (@_) { next if $pkg->isa($base); push @{"$pkg\::ISA"}, $base; - unless (exists ${"$base\::"}{VERSION}) { + my $vglob; + 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. @@ -67,7 +68,7 @@ sub import { "which defines that package first.)"); } ${"$base\::VERSION"} = "-1, set by base.pm" - unless exists ${"$base\::"}{VERSION}; + unless ${*{"$base\::VERSION"}{SCALAR}}; } # A simple test like (defined %{"$base\::FIELDS"}) will