diff options
author | Justin Davis <jrcd83@gmail.com> | 2012-06-06 04:13:22 +0200 |
---|---|---|
committer | Justin Davis <jrcd83@gmail.com> | 2012-06-06 04:13:22 +0200 |
commit | 8d518c625c9827f38adbeda6e910e74349d91a75 (patch) | |
tree | 64aa8d9b269c2801365a681d0654390483764f26 /misc | |
parent | 74544be00ede0469ab344a0e2563d84ace338f99 (diff) | |
download | genpkg-8d518c625c9827f38adbeda6e910e74349d91a75.tar.gz genpkg-8d518c625c9827f38adbeda6e910e74349d91a75.tar.xz |
Scrape *_pm.PL scripts in misc/perlcore.
Regenerates perlcore.mods-5.16.0 using the new script.
DynaLoader and some ext/ modules were missing.
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/perlcore | 67 | ||||
-rw-r--r-- | misc/perlcore.mods-5.16.0 | 6 |
2 files changed, 50 insertions, 23 deletions
diff --git a/misc/perlcore b/misc/perlcore index cfc3ef0..1e7df58 100755 --- a/misc/perlcore +++ b/misc/perlcore @@ -25,6 +25,41 @@ sub pathmod return $p; } +sub findpms # a foolhardy task! +{ + my($ddir) = @_; + my @modpaths; + + $ddir = "$ddir/lib" if(-d "$ddir/lib"); + my $finder = sub { + return unless(/[.]pm$/); + return if(m{/t/}); + + my $p = $_; + s{^\Q$ddir\E/}{}; + my $m = pathmod($_); + push @modpaths, [ $m, $p ]; + }; + findfile({ 'no_chdir' => 1, 'wanted' => $finder }, $ddir); + + return @modpaths; +} + +sub findpl +{ + my($p) = @_; + + my $m; + my $d = $p; + $d =~ s{.+/}{}; + $m = $d; + $m =~ s{-}{::}g; + + $d =~ s{.+-}{}; + $p = "${p}/${d}_pm.PL"; + return (-f $p ? [ $m, $p ] : undef); +} + # scans a directory full of nicely separated dist. directories. sub scan_distroot { @@ -33,30 +68,16 @@ sub scan_distroot my @dists = grep { !/^[.]/ && -d "$distroot/$_" } readdir $cpand; closedir $cpand; - my @found; - for my $ddir (map { "$distroot/$_" } @dists){ - for("$ddir/lib"){ - $ddir = $_ if(-d $_); - } - my $finder = sub { - return unless(/[.]pm$/); - return if(m{/t/}); - - my $p = $_; - s{^\Q$ddir\E/}{}; - my $m = pathmod($_); - - my $v = findver($p, $m); - if($v){ - push @found, [ $m, $v ]; - }else{ - #warn "failed to find version in $p\n"; - } - }; - findfile({ 'no_chdir' => 1, 'wanted' => $finder }, $ddir); - } + my @found = map { + my $ddir = $_; + findpl($ddir) or findpms($ddir); + } map { "$distroot/$_" } @dists; - return @found; + return map { + my($m, $p) = @$_; + my $v = findver($p, $m); + ($v ? [ $m, $v ] : ()); + } @found; } sub findmods diff --git a/misc/perlcore.mods-5.16.0 b/misc/perlcore.mods-5.16.0 index a579427..5fc65fa 100644 --- a/misc/perlcore.mods-5.16.0 +++ b/misc/perlcore.mods-5.16.0 @@ -109,6 +109,7 @@ DCLsym 1.05 * Debug 1.17 Deparse 1.14 * Devel::InnerPackage 0.4 +Devel::PPPort 3.20 Devel::SelfStubber 1.05 Digest 1.17 Digest::SHA 5.71 @@ -117,6 +118,7 @@ Digest::file 1.16 DirHandle 1.04 * Dumper 2.135_06 * Dumpvalue 1.17 +DynaLoader 1.14 * Encode::Alias 2.15 Encode::CJKConstants 2.02 Encode::CN::HZ 2.05 @@ -134,6 +136,7 @@ Encode::MIME::Name 1.01 Encode::Unicode::UTF7 2.05 English 1.05 * Env 1.03 +Errno 1.15 * Exporter 5.66 Exporter::Heavy 5.64_01 * ExtUtils::CBuilder 0.280206 @@ -410,6 +413,7 @@ Piece 1.20_01 * Pod::Checker 1.51 Pod::Escapes 1.04 Pod::Find 1.51 +Pod::Functions 1.05 * Pod::Html 1.1502 * Pod::InputObjects 1.51 Pod::LaTeX 0.60 @@ -563,6 +567,7 @@ User::pwent 1.00 * Version::Requirements 0.101022 Win32 0.44 Win32CORE 0.02 * +XSLoader 0.16 Zlib 1.10 * _charnames 1.31 * arybase 0.05 * @@ -592,6 +597,7 @@ inc::latest 0.39_01 inc::latest::private 0.39_01 integer 1.00 * less 0.03 * +lib 0.63 locale 1.01 * mmap 0.010 * mro 1.09 * |