This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
More leniency to the \p and \P: now can have whitespace
[perl5.git] / lib / base.pm
index d055129..c6d8cca 100644 (file)
@@ -44,8 +44,8 @@ L<fields>
 
 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