develooper Front page | perl.perl5.porters | Postings from March 2000

[PATCH 5.5.670] AutoLoader.pm cleanup

From:
Greg Bacon
Date:
March 1, 2000 08:05
Subject:
[PATCH 5.5.670] AutoLoader.pm cleanup
Message ID:
200003011613.KAA21524@ruby.itsc.uah.edu
--- perl-5.5.670.dist/lib/AutoLoader.pm	Sun Jan 23 06:20:11 2000
+++ perl-5.5.670/lib/AutoLoader.pm	Wed Mar  1 10:11:22 2000
@@ -36,7 +36,7 @@
 	my ($pkg,$func) = ($sub =~ /(.*)::([^:]+)$/);
 	$pkg =~ s#::#/#g;
 	if (defined($filename = $INC{"$pkg.pm"})) {
-	    $filename =~ s#^(.*)$pkg\.pm$#$1auto/$pkg/$func.al#;
+	    $filename =~ s#^(.*)$pkg\.pm\z#$1auto/$pkg/$func.al#s;
 
 	    # if the file exists, then make sure that it is a
 	    # a fully anchored path (i.e either '/usr/lib/auto/foo/bar.al',
@@ -45,9 +45,9 @@
 	    # looked for 'lib/lib/auto/foo/bar.al', given @INC = ('lib').
 
 	    if (-r $filename) {
-		unless ($filename =~ m|^/|) {
+		unless ($filename =~ m|^/|s) {
 		    if ($is_dosish) {
-			unless ($filename =~ m{^([a-z]:)?[\\/]}i) {
+			unless ($filename =~ m{^([a-z]:)?[\\/]}is) {
 			     $filename = "./$filename";
 			}
 		    }



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About