Handle symlinks, high permission bits in File::Path
[p5sagit/p5-mst-13.2.git] / installperl
index 53468a9..07b1e55 100755 (executable)
@@ -243,6 +243,7 @@ if (! $versiononly || !($installprivlib =~ m/\Q$]/)) {
                       "${installarchlib}/pod/perldiag.pod");
     if (compare($from, $to) || $nonono) {
        mkpath("${installarchlib}/pod", 1, 0777);
+       unlink($to);
        link($from, $to);
     }
 }
@@ -414,7 +415,7 @@ sub installlib {
     }
 
     if (-f $_) {
-       if (/\.al$/ || /\.ix$/) {
+       if (/\.(?:al|ix)$/ && !($dir =~ m[^auto/(.*)$] && $archpms{$1})) {
            $installlib = $installprivlib;
            #We're installing *.al and *.ix files into $installprivlib,
            #but we have to delete old *.al and *.ix files from the 5.000