From: Rafael Garcia-Suarez Date: Mon, 23 Feb 2004 22:08:33 +0000 (+0000) Subject: Instead of localising *_, use a dummy foreach loop to get X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4c621fafb1207a431474b7e038369b162e2416f5;p=p5sagit%2Fp5-mst-13.2.git Instead of localising *_, use a dummy foreach loop to get a local value of $_ p4raw-id: //depot/perl@22367 --- diff --git a/lib/File/Find.pm b/lib/File/Find.pm index 5e18cfc..5f590e2 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: