2 # Generates info for Module::CoreList from this perl tree
3 # run this from the root of a clean perl tree
12 /(\.pm|_pm\.PL)$/ or return;
13 /PPPort\.pm$/ and return;
14 my $module = $File::Find::name;
15 $module =~ /\b(demo|t|private)\b/ and return; # demo or test modules
16 my $version = MM->parse_version($_);
17 defined $version or $version = 'undef';
18 $version =~ /\d/ and $version = "'$version'";
19 # some heuristics to figure out the module name from the file name
20 $module =~ s{^(lib|(win32/|vms/|symbian/)?ext)/}{}
22 and ( $module =~ s{^(.*)/lib/\1\b}{$1},
23 $module =~ s{(\w+)/\1\b}{$1},
24 $module =~ s{^B/O}{O},
25 $module =~ s{^Devel-PPPort}{Devel},
26 $module =~ s{^Encode/encoding}{encoding},
27 $module =~ s{^IPC-SysV/}{IPC/},
28 $module =~ s{^MIME-Base64/QuotedPrint}{MIME/QuotedPrint},
29 $module =~ s{^(?:DynaLoader|Errno|Opcode)/}{},
33 $module =~ s{^.*::lib::}{};
34 $module =~ s/(\.pm|_pm\.PL)$//;
35 $lines{$module} = $version;
36 }, 'lib', 'ext', 'vms/ext', 'symbian/ext');
38 -e 'configpm' and $lines{Config} = 'undef';
40 if (open my $ucdv, "<", "lib/unicore/version") {
41 chomp (my $ucd = <$ucdv>);
42 $lines{Unicode} = "'$ucd'";
46 foreach (sort keys %lines) {
47 printf "\t%-24s=> $lines{$_},\n", "'$_'";