PATCH 5.6 perldebguts grammar cleanup
[p5sagit/p5-mst-13.2.git] / installperl
index 07c9bba..b027d02 100755 (executable)
@@ -364,26 +364,30 @@ if (! $versiononly && (-f 'cppstdin') && (! samepath($installbin, '.'))) {
     chmod(0755, "$installbin/cppstdin");
 }
 
-# Install scripts.
+if ($Config{installscripts} eq 'define') {
+    # Install scripts.
 
-mkpath($installscript, $verbose, 0777);
+    mkpath($installscript, $verbose, 0777);
 
-if (! $versiononly) {
-    for (@scripts) {
-       (my $base = $_) =~ s#.*/##;
-       copy($_, "$installscript/$base");
-       chmod(0755, "$installscript/$base");
+    if (! $versiononly) {
+       for (@scripts) {
+           (my $base = $_) =~ s#.*/##;
+           copy($_, "$installscript/$base");
+           chmod(0755, "$installscript/$base");
+       }
     }
-}
 
-# pstruct should be a link to c2ph
-
-if (! $versiononly) {
-    safe_unlink("$installscript/pstruct$scr_ext");
-    if ($^O eq 'dos' or $Is_VMS or $^O eq 'transit') {
-        copy("$installscript/c2ph$scr_ext", "$installscript/pstruct$scr_ext"); 
-    } else {
-        link("$installscript/c2ph$scr_ext", "$installscript/pstruct$scr_ext");
+    # pstruct should be a link to c2ph
+    
+    if (! $versiononly) {
+       safe_unlink("$installscript/pstruct$scr_ext");
+       if ($^O eq 'dos' or $Is_VMS or $^O eq 'transit') {
+           copy("$installscript/c2ph$scr_ext",
+                "$installscript/pstruct$scr_ext"); 
+       } else {
+           link("$installscript/c2ph$scr_ext",
+                "$installscript/pstruct$scr_ext");
+       }
     }
 }
 
@@ -511,7 +515,7 @@ sub safe_unlink {
 
 sub safe_rename {
     my($from,$to) = @_;
-    if (-f $to and not &unlink($to)) {
+    if (-f $to and not unlink($to)) {
        my($i);
        for ($i = 1; $i < 50; $i++) {
            last if rename($to, "$to.$i");
@@ -520,7 +524,7 @@ sub safe_rename {
           if $i >= 50; # Give up!
     }
     link($from,$to) || return 0;
-    &unlink($from);
+    unlink($from);
 }
 
 sub link {
@@ -625,16 +629,16 @@ sub installlib {
            #but we have to delete old *.al and *.ix files from the 5.000
            #distribution:
            #This might not work because $archname might have changed.
-           &unlink("$installarchlib/$name");
+           unlink("$installarchlib/$name");
        }
         $packlist->{"$installlib/$name"} = { type => 'file' };
        if (compare($_, "$installlib/$name") || $nonono) {
-           &unlink("$installlib/$name");
+           unlink("$installlib/$name");
            mkpath("$installlib/$dir", $verbose, 0777);
            # HP-UX (at least) needs to maintain execute permissions
            # on dynamically-loaded libraries.
            copy_if_diff($_, "$installlib/$name")
-               and &chmod($name =~ /\.(so|$dlext)$/o ? 0555 : 0444,
+               and chmod($name =~ /\.(so|$dlext)$/o ? 0555 : 0444,
                           "$installlib/$name");
        }
     }