X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Porting%2Fcorecpan.pl;h=6fced80e5a96b950ed566ef3aac414ffa15a15d0;hb=18869dc676cf135549b1be0ce06b9a400bb0f137;hp=f57899fb73faebae8eed35a176406fa829bfd4f0;hpb=f6e59a58ce5f29ee30bbfb2cb10fc14905407320;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Porting/corecpan.pl b/Porting/corecpan.pl index f57899f..6fced80 100644 --- a/Porting/corecpan.pl +++ b/Porting/corecpan.pl @@ -81,10 +81,14 @@ foreach my $source (@sources) { for my $dist (sort keys %Modules) { next unless $Modules{$dist}{CPAN}; for my $file (get_module_files($dist)) { - next if $file !~ /\.pm\z/ or $file =~ m{^t/} or $file =~ m{/t/}; + next if $file !~ /(\.pm|_pm.PL)\z/ + or $file =~ m{^t/} or $file =~ m{/t/}; my $vcore = '!EXIST'; $vcore = MM->parse_version($file) // 'undef' if -f $file; + + # get module name from filename to lookup CPAN version my $module = $file; + $module =~ s/\_pm.PL\z//; $module =~ s/\.pm\z//; # some heuristics to figure out the module name from the file name $module =~ s{^(lib|ext)/}{}