This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Disable the strict pragma before eval'ing selfloaded code.
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 27 Feb 2007 14:07:28 +0000 (14:07 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 27 Feb 2007 14:07:28 +0000 (14:07 +0000)
p4raw-id: //depot/perl@30418

lib/SelfLoader.pm

index 34283b2..1136cf0 100644 (file)
@@ -49,7 +49,10 @@ AUTOLOAD {
     }
     print STDERR "SelfLoader::AUTOLOAD eval: $SL_code\n" if DEBUG;
 
-    eval $SL_code;
+    {
+       no strict;
+       eval $SL_code;
+    }
     if ($@) {
         $@ =~ s/ at .*\n//;
         croak $@;
@@ -131,6 +134,7 @@ sub _load_stubs {
         }
     }
     push(@stubs, $self->_add_to_cache($name, $currpack, \@lines, $protoype));
+    no strict;
     eval join('', @stubs) if @stubs;
 }