t/porting/dual-life.t now passes no_chdir to File::Find::find().
authorNicholas Clark <nick@ccl4.org>
Tue, 28 Aug 2012 15:23:10 +0000 (17:23 +0200)
committerNicholas Clark <nick@ccl4.org>
Wed, 29 Aug 2012 10:23:46 +0000 (12:23 +0200)
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.

t/porting/dual-life.t

index 4574721..18077db 100644 (file)
@@ -36,13 +36,13 @@ $dist_dir_exe{'pod2html.pl'} = '../ext/Pod-Html';
 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 ),
 );