diff options
-rwxr-xr-x | installperl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/installperl b/installperl index e6e2bbeb6f..bbcd1c383a 100755 --- a/installperl +++ b/installperl @@ -30,6 +30,14 @@ umask 022; @pods = (<pod/*.pod>); +%archpms = (Config => 1, FileHandle => 1, overload => 1); +find(sub { + if ("$File::Find::dir/$_" =~ m{^ext/[^/]+/(.*)\.pm$}) { + (my $pm = $1) =~ s{^lib/}{}; + $archpms{$pm} = 1; + } + }, 'ext'); + $ver = $]; $release = substr($ver,0,3); # Not used presently. $patchlevel = substr($ver,3,2); @@ -349,7 +357,8 @@ sub installlib { $name = "$dir/$name" if $dir ne ''; my $installlib = $installprivlib; - if ($dir =~ /^auto/ || $name =~ /^(Config|FileHandle|Safe)\.pm$/) { + if ($dir =~ /^auto/ || + ($name =~ /^(.*)\.(?:pm|pod)$/ && $archpms{$1})) { $installlib = $installarchlib; return unless $do_installarchlib; } else { |