X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Porting%2Fcorecpan.pl;h=0a6086c809539c9a052db0e192eefeff090f6b61;hb=115454352a978d4e8b08f627af1ad772bab2816b;hp=6fced80e5a96b950ed566ef3aac414ffa15a15d0;hpb=19e87f221220123fd05380fca766d035586f60bf;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Porting/corecpan.pl b/Porting/corecpan.pl index 6fced80..0a6086c 100644 --- a/Porting/corecpan.pl +++ b/Porting/corecpan.pl @@ -91,8 +91,8 @@ foreach my $source (@sources) { $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)/}{} - and $1 eq 'ext' + $module =~ s{^(lib|ext|dist|cpan)/}{} + and $1 =~ /(?:ext|dist|cpan)/ and ( # ext/Foo-Bar/Bar.pm $module =~ s{^(\w+)-(\w+)/\2$}{$1/lib/$1/$2}, @@ -155,11 +155,12 @@ if ($opt_t) { } else { for my $dist (sort { lc $a cmp lc $b } keys %results) { - print "Module $dist...\n"; + my $distname_printed = 0; for my $file (sort keys %{$results{$dist}}) { my ($vcore, $vcpan) = @{$results{$dist}{$file}}{@labels}; if (our $opt_v or $vcore ne $vcpan) { - print " $file: core=$vcore, cpan=$vcpan\n"; + print "\n$dist:\n" unless ($distname_printed++); + print "\t$file: core=$vcore, cpan=$vcpan\n"; } } }