]> git.imager.perl.org - imager.git/commitdiff
[rt #86658] scan MANIFEST for pod to check, not blib
authorTony Cook <tony@develop-help.com>
Fri, 5 Jul 2013 12:34:19 +0000 (22:34 +1000)
committerTony Cook <tony@develop-help.com>
Fri, 5 Jul 2013 12:34:19 +0000 (22:34 +1000)
Not all the files are always installed

t/950-kwalitee/060-podstruct.t

index 837d0c256a5699fe8c4f6c06c8b27d3c8459a5fd..78420f243c0101a3bbf1223524bcc4c45b115edc 100644 (file)
@@ -7,21 +7,19 @@ BEGIN {
   eval 'use Pod::Parser 1.50;';
   plan skip_all => "Pod::Parser 1.50 required for podlinkcheck" if $@;
 }
-use File::Find;
 use File::Spec::Functions qw(rel2abs abs2rel splitdir);
+use ExtUtils::Manifest qw(maniread);
 
 # this test is intended to catch errors like in
 # https://rt.cpan.org/Ticket/Display.html?id=85413
 
 my @pod; # files with pod
 
-my $base = rel2abs("blib/lib");
+my $base = rel2abs(".");
 
-my @files;
-find(sub {
-       -f && /\.(pod|pm)$/
-        and push @files, $File::Find::name;
-     }, $base);
+my $manifest = maniread();
+
+my @files = sort grep /\.(pod|pm)$/ && !/^inc/, keys %$manifest;
 
 my %item_in;