summaryrefslogtreecommitdiff
path: root/installperl
diff options
context:
space:
mode:
authorSteve Hay <SteveHay@planit.com>2009-10-02 00:56:10 +0100
committerSteve Hay <SteveHay@planit.com>2009-10-02 00:56:10 +0100
commit19c8b1959f8e62550ec7e54c8a12efbf034555a3 (patch)
tree8634565555d6c726c8610a605720ed44820177ac /installperl
parentde7c4619908943aa919540117065f89818727799 (diff)
downloadperl-19c8b1959f8e62550ec7e54c8a12efbf034555a3.tar.gz
Make installperl look in cpan/ and dist/ as well as in ext/ when looking
for %archpms. Also add a trailing / after the $dir when checking whether a .pm file is that of a non-nonxs_ext module, otherwise entries in nonxs_ext for Digest and Math/BigInt wrongly cause Digest-MD5, Digest-SHA and Math-BigInt-FastCalc to be omitted.
Diffstat (limited to 'installperl')
-rwxr-xr-xinstallperl51
1 files changed, 27 insertions, 24 deletions
diff --git a/installperl b/installperl
index 1705d347cf..38f51ea6d7 100755
--- a/installperl
+++ b/installperl
@@ -156,30 +156,33 @@ if ((-e "testcompile") && (defined($ENV{'COMPILE'}))) {
# 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;