This avoids the test occasionally aborting due to File::Find::find() calling
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 %files;
my $test_count = 0;
-find(sub {
+find({no_chdir => 1, wanted => sub {
my $name = $File::Find::name;
# Assumes that the path separator is exactly one character.
$name =~ s/^\..//;
}
push @{$files{lc $name}}, $name;
- }, '.');
+ }}, '.');
foreach (sort values %files) {
if (@$_ > 1) {