diff options
author | Roderick Schertler <roderick@gate.net> | 1996-12-19 12:44:34 -0500 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1996-12-20 11:14:00 +1200 |
commit | 28312d68c47acb9f56de892774db5561fea4db01 (patch) | |
tree | f7141f0cb052ed09afdd577e81e5afbb28d6eaf7 /lib/File | |
parent | 477f5d66753fb2a661264a381aecf12e9a9beac1 (diff) | |
download | perl-28312d68c47acb9f56de892774db5561fea4db01.tar.gz |
Re: find2perl . -xdev BROKEN still
On Thu, 19 Dec 1996 08:06:04 -0800, David Dyck <dcd@TC.FLUKE.COM> said:
>
> It seems that the -xdev feature for find2perl has been broken for that
> last few subversions.
>
> I think it is because $topdev is no longer exported from find.
You are right. This has been broken since find.pl was replaced with a
wrapper around File::Find. Here's a fix.
PS: I know this has come up before, but why don't we offer $name, $dir
and so on (or maybe $find_name, etc, aliases) in @EXPORT_OK?
p5p-msgid: <pzvi9yig3h.fsf@eeyore.ibcinc.com>
Diffstat (limited to 'lib/File')
-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); |