diff options
Diffstat (limited to 'lib/File/Find.pm')
-rw-r--r-- | lib/File/Find.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/File/Find.pm b/lib/File/Find.pm index c5ce68ca1a..1faea50158 100644 --- a/lib/File/Find.pm +++ b/lib/File/Find.pm @@ -74,7 +74,9 @@ that don't resolve: sub find { my $wanted = shift; my $cwd = Cwd::cwd(); - my ($topdir,$topdev,$topino,$topmode,$topnlink); + # Localize these rather than lexicalizing them for backwards + # compatibility. + local($topdir,$topdev,$topino,$topmode,$topnlink); foreach $topdir (@_) { (($topdev,$topino,$topmode,$topnlink) = stat($topdir)) || (warn("Can't stat $topdir: $!\n"), next); @@ -163,7 +165,9 @@ sub finddepth { $cwd = Cwd::fastcwd();; - my($topdir, $topdev, $topino, $topmode, $topnlink); + # Localize these rather than lexicalizing them for backwards + # compatibility. + local($topdir, $topdev, $topino, $topmode, $topnlink); foreach $topdir (@_) { (($topdev,$topino,$topmode,$topnlink) = stat($topdir)) || (warn("Can't stat $topdir: $!\n"), next); |