File::Find::find() can call warn::warnif(), which in turn attempts to lazy
load Carp, which doesn't work for a test using relative paths in @INC with
the current directory changed.
my @programs;
find(
- sub {
+ { no_chidr => 1, wanted => sub {
my $name = $File::Find::name;
return if $name =~ /blib/;
return unless $name =~ m{/(?:bin|scripts?)/\S+\z} && $name !~ m{/t/};
push @programs, $name;
- },
+ }},
qw( ../cpan ../dist ../ext ),
);