summaryrefslogtreecommitdiff
path: root/Porting/corecpan.pl
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2009-05-17 01:41:06 +0100
committerDavid Mitchell <davem@iabyn.com>2009-05-17 01:43:22 +0100
commit19e87f221220123fd05380fca766d035586f60bf (patch)
tree091007a9b0c7a6049c9d9d8302a467ffe9669197 /Porting/corecpan.pl
parentf6e59a58ce5f29ee30bbfb2cb10fc14905407320 (diff)
downloadperl-19e87f221220123fd05380fca766d035586f60bf.tar.gz
make Porting/corecpan.pl handle versions hidden in *_pm.PL files
(ie scripts that generate .pm files)
Diffstat (limited to 'Porting/corecpan.pl')
-rw-r--r--Porting/corecpan.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/Porting/corecpan.pl b/Porting/corecpan.pl
index f57899fb73..6fced80e5a 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)/}{}