diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-02-17 23:22:45 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-02-17 23:22:45 +0000 |
commit | be56ab1f8df33612d7b40c6ada095aa7922d7626 (patch) | |
tree | 9564be96c8d6bc4f558fdbdf13d8ff5cd87e28c3 /lib/File | |
parent | bebab73acbc7983ff7bfeb8391a5b359fa6091f1 (diff) | |
download | perl-be56ab1f8df33612d7b40c6ada095aa7922d7626.tar.gz |
It's better to localize *_ than $_, to avoid magic leakage
p4raw-id: //depot/perl@22327
Diffstat (limited to 'lib/File')
-rw-r--r-- | lib/File/Find.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/File/Find.pm b/lib/File/Find.pm index c81c02e077..5e18cfce35 100644 --- a/lib/File/Find.pm +++ b/lib/File/Find.pm @@ -3,7 +3,7 @@ use 5.006; use strict; use warnings; use warnings::register; -our $VERSION = '1.06'; +our $VERSION = '1.07'; require Exporter; require Cwd; @@ -591,7 +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); - local($dir, $name, $fullname, $prune, $_); + my @_args = @_; + local($dir, $name, $fullname, $prune, *_); my $cwd = $wanted->{bydepth} ? Cwd::fastcwd() : Cwd::getcwd(); my $cwd_untainted = $cwd; @@ -618,7 +619,7 @@ sub _find_opt { my ($abs_dir, $Is_Dir); Proc_Top_Item: - foreach my $TOP (@_) { + foreach my $TOP (@_args) { my $top_item = $TOP; if ($Is_MacOS) { |