summaryrefslogtreecommitdiff
path: root/lib/AutoSplit.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-02-25 14:42:11 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-02-25 14:42:11 +0000
commit9938a85fa116cd4e8e8091e66b37c35ee9b5a086 (patch)
tree0b05c468613fabdd012a2290e6d88caa66c765b5 /lib/AutoSplit.pm
parentacd15b85995cf95382f158dbf237ef9c2ee99b7b (diff)
downloadperl-9938a85fa116cd4e8e8091e66b37c35ee9b5a086.tar.gz
Don't clobber $_ by using "my $_". Potential bug found by Alexey Tourbin.
p4raw-id: //depot/perl@30394
Diffstat (limited to 'lib/AutoSplit.pm')
-rw-r--r--lib/AutoSplit.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/AutoSplit.pm b/lib/AutoSplit.pm
index bf0f9256c8..1adb00d271 100644
--- a/lib/AutoSplit.pm
+++ b/lib/AutoSplit.pm
@@ -1,6 +1,6 @@
package AutoSplit;
-use 5.006_001;
+use 5.009004; # due to "my $_"
use Exporter ();
use Config qw(%Config);
use File::Basename ();
@@ -10,7 +10,7 @@ use strict;
our($VERSION, @ISA, @EXPORT, @EXPORT_OK, $Verbose, $Keep, $Maxlen,
$CheckForAutoloader, $CheckModTime);
-$VERSION = "1.04_01";
+$VERSION = "1.05";
@ISA = qw(Exporter);
@EXPORT = qw(&autosplit &autosplit_lib_modules);
@EXPORT_OK = qw($Verbose $Keep $Maxlen $CheckForAutoloader $CheckModTime);
@@ -175,11 +175,11 @@ sub carp{
# This function is used during perl building/installation
# ./miniperl -e 'use AutoSplit; autosplit_lib_modules(@ARGV)' ...
-sub autosplit_lib_modules{
+sub autosplit_lib_modules {
my(@modules) = @_; # list of Module names
- while(defined($_ = shift @modules)){
- while (m#(.*?[^:])::([^:].*)#) { # in case specified as ABC::XYZ
+ while (defined(my $_ = shift @modules)) {
+ while (m#([^:]+)::([^:].*)#) { # in case specified as ABC::XYZ
$_ = catfile($1, $2);
}
s|\\|/|g; # bug in ksh OS/2