X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FExtUtils%2Ft%2F00compile.t;h=5eb015b13dd391ea62fc75b8c6e06594e6bf0428;hb=1df8d17976b1cba61ff44907306d0eb746cb4fce;hp=19cddc5539130974a0f574a873f5b282d5d929cd;hpb=479d2113ccb2226821ef75027b9186d1d0e367e9;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/ExtUtils/t/00compile.t b/lib/ExtUtils/t/00compile.t index 19cddc5..5eb015b 100644 --- a/lib/ExtUtils/t/00compile.t +++ b/lib/ExtUtils/t/00compile.t @@ -19,35 +19,24 @@ BEGIN { $Has_Test_Pod = eval 'use Test::Pod 0.95; 1'; } -my(@modules); - -chdir File::Spec->catdir(File::Spec->updir, 'lib'); -find( sub { - return if /~$/; - if( $File::Find::dir =~ /^blib|t$/ ) { - $File::Find::prune = 1; - return; - } - push @modules, $File::Find::name if /\.pm$/; - }, 'ExtUtils' -); - +chdir File::Spec->updir; +my $manifest = File::Spec->catfile('MANIFEST'); +open(MANIFEST, $manifest) or die "Can't open $manifest: $!"; +my @modules = map { m{^lib/(\S+)}; $1 } + grep { m{^lib/ExtUtils/\S*\.pm} } ; +chomp @modules; +close MANIFEST; + +chdir 'lib'; plan tests => scalar @modules * 2; foreach my $file (@modules) { - local @INC = @INC; - unshift @INC, File::Spec->curdir; - - # This piece of insanity brought to you by non-case preserving - # file systems! We have extutils/command.pm, %INC has - # ExtUtils/Command.pm - # Furthermore, 5.8.0 has a bug about require alone in an eval. Thus - # the extra statement. - eval q{ require($file); 1 } unless grep { lc $file =~ lc $_ } keys %INC; + # 5.8.0 has a bug about require alone in an eval. Thus the extra + # statement. + eval { require($file); 1 }; is( $@, '', "require $file" ); SKIP: { skip "Test::Pod not installed", 1 unless $Has_Test_Pod; pod_file_ok($file); } - }