Description: Replace usage of 'find.pl' by File::Find find.pl is scheduled for removal from the perl core Author: Damyan Ivanov Forwarded: no See also https://rt.cpan.org/Ticket/Display.html?id=74537 Originally found in: http://patch-tracker.debian.org/patch/series/dl/perlindex/1.605-4/perl4libs.patch --- a/perlindex.PL +++ b/perlindex.PL @@ -187,7 +187,7 @@ if ($opt_index) { tie (%FN, AnyDBM_File, "$IDIR/index_fn", O_CREAT|O_RDWR, 0644) or die "Could not tie $IDIR/index_fn: $!\n"; - require "find.pl"; + require File::Find; open (CONFIG, "<$conffile") || die "Can't open config file $conffile: $!"; my @config_perllib = ; @@ -205,7 +205,7 @@ if ($opt_index) { my $target = readlink $dir; $dir =~ s:[^/]+$:$target:; } - &find($dir); + File::Find::find( \&wanted, $dir ); } } @@ -287,13 +287,13 @@ if ($opt_index) { } sub wanted { - my $fns = $name; + my $fns = $File::Find::name; - if ($name eq $man3direxp) { - $prune = 1; + if ($File::Find::name eq $man3direxp) { + $File::Find::prune = 1; } - if (-f $_ and $name =~ /man|bin|\.(pod|pm|txt)$/) { - add_to_index($name); + if (-f $_ and $File::Find::name =~ /man|bin|\.(pod|pm|txt)$/) { + add_to_index($File::Find::name); } }