Integrate from ansi branch to mainline.
[p5sagit/p5-mst-13.2.git] / installperl
index 9563bda..e999d3b 100755 (executable)
@@ -1,7 +1,7 @@
 #!./perl
 
 BEGIN {
-    require 5.003_90;
+    require 5.004;
     @INC = 'lib';
     $ENV{PERL5LIB} = 'lib';
 }
@@ -128,9 +128,9 @@ push(@corefiles,'perl.exp') if $^O eq 'aix';
 push(@corefiles,'sperl.o') if -f 'sperl.o';
 foreach $file (@corefiles) {
     # HP-UX (at least) needs to maintain execute permissions
-    # on dynamically-loaded libraries.
+    # on dynamically-loadable libraries. So we do it for all.
     copy_if_diff($file,"$installarchlib/CORE/$file")
-       and chmod($file =~ /^\.(so|$dlext)$/ ? 0555 : 0444,
+       and chmod($file =~ /\.(so|\Q$dlext\E)$/ ? 0555 : 0444,
                   "$installarchlib/CORE/$file");
 }
 
@@ -349,7 +349,9 @@ sub link {
     eval {
        CORE::link($from, $to)
            ? $success++
-           : warn "Couldn't link $from to $to: $!\n"
+           : ($from =~ m#^/afs/# || $to =~ m#^/afs/#)
+             ? die "AFS"  # okay inside eval {}
+             : warn "Couldn't link $from to $to: $!\n"
          unless $nonono;
     };
     if ($@) {
@@ -399,15 +401,17 @@ sub installlib {
     local($depth) = $dir ? "lib/$dir" : "lib";
 
     my $name = $_;
+
+    if ($name eq 'CVS' && -d $name) {
+       $File::Find::prune = 1;
+       return;
+    }
     
     # ignore patch backups and the .exists files.
     return if $name =~ m{\.orig$|~$|^\.exists};
 
     $name = "$dir/$name" if $dir ne '';
 
-    # ignore Chip-style patch backups.
-    return if grep(/^P\d+$/, split(m{/+}, $name));
-
     my $installlib = $installprivlib;
     if ($dir =~ /^auto/ ||
          ($name =~ /^(.*)\.(?:pm|pod)$/ && $archpms{$1})) {