summaryrefslogtreecommitdiff
path: root/lib/File
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-02-23 22:08:33 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-02-23 22:08:33 +0000
commit4c621fafb1207a431474b7e038369b162e2416f5 (patch)
treee2dcf0a8dd2d558d108152153b5bac8da45ea850 /lib/File
parent290b54b83d6da552ba07ccf73aa47d172a5ab300 (diff)
downloadperl-4c621fafb1207a431474b7e038369b162e2416f5.tar.gz
Instead of localising *_, use a dummy foreach loop to get
a local value of $_ p4raw-id: //depot/perl@22367
Diffstat (limited to 'lib/File')
-rw-r--r--lib/File/Find.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/File/Find.pm b/lib/File/Find.pm
index 5e18cfce35..5f590e2803 100644
--- a/lib/File/Find.pm
+++ b/lib/File/Find.pm
@@ -591,8 +591,8 @@ sub _find_opt {
local ($wanted_callback, $avoid_nlink, $bydepth, $no_chdir, $follow,
$follow_skip, $full_check, $untaint, $untaint_skip, $untaint_pat,
$pre_process, $post_process, $dangling_symlinks);
- my @_args = @_;
- local($dir, $name, $fullname, $prune, *_);
+ local($dir, $name, $fullname, $prune);
+ for (my $_temp) { # creates a local $_ without retaining magic
my $cwd = $wanted->{bydepth} ? Cwd::fastcwd() : Cwd::getcwd();
my $cwd_untainted = $cwd;
@@ -619,7 +619,7 @@ sub _find_opt {
my ($abs_dir, $Is_Dir);
Proc_Top_Item:
- foreach my $TOP (@_args) {
+ foreach my $TOP (@_) {
my $top_item = $TOP;
if ($Is_MacOS) {
@@ -743,6 +743,7 @@ sub _find_opt {
}
}
}
+ }
}
# API: