This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bug in AutoLoader.pm causing endless loop
authorSteffen Müller <0mgwtfbbq@sneakemail.com>
Tue, 9 Jan 2007 19:15:36 +0000 (20:15 +0100)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 10 Jan 2007 10:54:27 +0000 (10:54 +0000)
Message-ID: <45A3DBC8.4010203@sneakemail.com>

p4raw-id: //depot/perl@29743

lib/AutoLoader.pm

index e740431..25b3928 100644 (file)
@@ -15,7 +15,7 @@ BEGIN {
     $is_epoc = $^O eq 'epoc';
     $is_vms = $^O eq 'VMS';
     $is_macos = $^O eq 'MacOS';
-    $VERSION = '5.61';
+    $VERSION = '5.62';
 }
 
 AUTOLOAD {
@@ -89,9 +89,11 @@ sub find_filename {
        if (defined($filename = $INC{"$pkg.pm"})) {
            if ($is_macos) {
                $pkg =~ tr#/#:#;
-               $filename =~ s#^(.*)$pkg\.pm\z#$1auto:$pkg:$func.al#s;
+               $filename = undef
+                 unless $filename =~ s#^(.*)$pkg\.pm\z#$1auto:$pkg:$func.al#s;
            } else {
-               $filename =~ s#^(.*)$pkg\.pm\z#$1auto/$pkg/$func.al#s;
+               $filename = undef
+                 unless $filename =~ s#^(.*)$pkg\.pm\z#$1auto/$pkg/$func.al#s;
            }
 
            # if the file exists, then make sure that it is a