From 4c621fafb1207a431474b7e038369b162e2416f5 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Mon, 23 Feb 2004 22:08:33 +0000 Subject: Instead of localising *_, use a dummy foreach loop to get a local value of $_ p4raw-id: //depot/perl@22367 --- lib/File/Find.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/File') 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: -- cgit v1.2.1