# Exclude nonxs extensions that are not architecture dependent
my @nonxs = grep(!/^Errno$/, split(' ', $Config{'nonxs_ext'}));
-find(sub {
- if (($File::Find::name =~ m{^ext\b(.*)/([^/]+)\.pm$}) &&
- ! grep { (my $dir = $_) =~ s/\//-/g;
- $File::Find::name =~ /^ext\/$dir/ } @nonxs)
- {
- my($path, $modname) = ($1,$2);
-
- # Change hypenated name like Filter-Util-Call to nested
- # directory name Filter/Util/Call
- $path =~ s{-}{/}g;
-
- # strip to optional "/lib", or remove trailing component
- $path =~ s{.*/lib\b}{} or $path =~ s{/[^/]*$}{};
-
- # strip any leading /
- $path =~ s{^/}{};
-
- # reconstitute canonical module name
- $modname = "$path/$modname" if length $path;
-
- # remember it
- $archpms{$modname} = 1;
- }
-}, 'ext');
+my @ext_dirs = qw(cpan dist ext);
+foreach my $ext_dir (@ext_dirs) {
+ find(sub {
+ if (($File::Find::name =~ m{^$ext_dir\b(.*)/([^/]+)\.pm$}) &&
+ ! grep { (my $dir = $_) =~ s/\//-/g;
+ $File::Find::name =~ /^$ext_dir\/$dir\// } @nonxs)
+ {
+ my($path, $modname) = ($1,$2);
+
+ # Change hypenated name like Filter-Util-Call to nested
+ # directory name Filter/Util/Call
+ $path =~ s{-}{/}g;
+
+ # strip to optional "/lib", or remove trailing component
+ $path =~ s{.*/lib\b}{} or $path =~ s{/[^/]*$}{};
+
+ # strip any leading /
+ $path =~ s{^/}{};
+
+ # reconstitute canonical module name
+ $modname = "$path/$modname" if length $path;
+
+ # remember it
+ $archpms{$modname} = 1;
+ }
+ }, $ext_dir);
+}
# print "[$_]\n" for sort keys %archpms;
if ( !$versiononly || ($installprivlib =~ m/\Q$vershort/)) {
mkpath("${installprivlib}/$pod", $opts{verbose}, 0777);
- # If Perl 5.003's perldiag.pod is there, rename it.
- if (open POD, "${installprivlib}/$pod/perldiag.pod") {
- read POD, $_, 4000;
- close POD;
- # Some of Perl 5.003's diagnostic messages ended with periods.
- if (/^=.*\.$/m) {
- my ($from, $to) = ("${installprivlib}/$pod/perldiag.pod",
- "${installprivlib}/$pod/perldiag-5.003.pod");
- print " rename $from $to";
- rename($from, $to)
- or warn "Couldn't rename $from to $to: $!\n"
- unless $opts{notify};
- }
- }
-
for (@pods) {
# $_ is a name like pod/perl.pod
(my $base = $_) =~ s#.*/##;
# ignore patch backups, RCS files, emacs backup & temp files and the
# .exists files, .PL files, and test files.
- return if $name =~ m{\.orig$|\.rej$|~$|^#.+#$|,v$|^\.exists|\.PL$|\.plc$|\.t$|^test\.pl$|^dbm_filter_util.pl$} ||
+ return if $name =~ m{\.orig$|\.rej$|~$|^#.+#$|,v$|^\.exists|\.PL$|\.plc$|\.t$|^test\.pl$|^dbm_filter_util\.pl$|^filter-util\.pl$|^uupacktool\.pl$|^\.gitignore$} ||
$dir =~ m{/t(?:/|$)};
# ignore the cpan script in lib/CPAN/bin, the instmodsh and xsubpp
# scripts in lib/ExtUtils, the prove script in lib/Test/Harness,