develooper Front page | perl.perl5.changes.mac | Postings from March 2003

Change 18939: lib.pm:_get_dirs() should use $_[0], not $_

From:
Chris Nandor
Date:
March 11, 2003 20:54
Subject:
Change 18939: lib.pm:_get_dirs() should use $_[0], not $_
Message ID:
p05200f08ba946da7addb@[10.0.1.104]
Change 18939 by pudge@pudge-mobile on 2003/03/12 03:17:22

	lib.pm:_get_dirs() should use $_[0], not $_

Affected files ...

... //depot/maint-5.8/macperl/lib/lib_pm.PL#3 edit

Differences ...

==== //depot/maint-5.8/macperl/lib/lib_pm.PL#3 (text) ====
Index: macperl/lib/lib_pm.PL
--- macperl/lib/lib_pm.PL#2~18199~	Wed Nov 27 21:20:16 2002
+++ macperl/lib/lib_pm.PL	Tue Mar 11 19:17:22 2003
@@ -112,11 +112,11 @@
 
     my %names;
     foreach (@_) {
-	local $_ = _nativize($_);
+	my $path = _nativize($_);
 
 	my($arch_auto_dir, $arch_dir, $version_dir, $version_arch_dir)
-	    = _get_dirs($_);
-	++$names{$_};
+	    = _get_dirs($path);
+	++$names{$path};
 	++$names{$arch_dir}         if -d $arch_auto_dir;
 	++$names{$version_dir}      if -d $version_dir;
 	++$names{$version_arch_dir} if -d $version_arch_dir;
@@ -134,15 +134,15 @@
     # we could use this for all platforms in the future, but leave it
     # Mac-only for now, until there is more time for testing it.
     if ($Is_MacOS) {
-	$arch_auto_dir    = File::Spec->catdir( $_, $archname, 'auto' );
-	$arch_dir         = File::Spec->catdir( $_, $archname, );
-	$version_dir      = File::Spec->catdir( $_, $version );
-	$version_arch_dir = File::Spec->catdir( $_, $version, $archname );
+	$arch_auto_dir    = File::Spec->catdir( $dir, $archname, 'auto' );
+	$arch_dir         = File::Spec->catdir( $dir, $archname, );
+	$version_dir      = File::Spec->catdir( $dir, $version );
+	$version_arch_dir = File::Spec->catdir( $dir, $version, $archname );
     } else {
-	$arch_auto_dir    = "$_/$archname/auto";
-	$arch_dir         = "$_/$archname";
-	$version_dir      = "$_/$version";
-	$version_arch_dir = "$_/$version/$archname";
+	$arch_auto_dir    = "$dir/$archname/auto";
+	$arch_dir         = "$dir/$archname";
+	$version_dir      = "$dir/$version";
+	$version_arch_dir = "$dir/$version/$archname";
     }
     return($arch_auto_dir, $arch_dir, $version_dir, $version_arch_dir);
 }
End of Patch.



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