diff options
Diffstat (limited to 'installperl')
-rwxr-xr-x | installperl | 51 |
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; |