This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Updates to perlfunc.pod
[perl5.git] / installperl
index aaa6773..1267f49 100755 (executable)
@@ -90,59 +90,6 @@ if ($d_dosuid) {
     &chmod(04711, "$installbin/sperl$ver$exe_ext");
 }
 
-# Make links to ordinary names if installbin directory isn't current directory.
-
-if (! $versiononly && ! &samepath($installbin, '.')) {
-    &safe_unlink("$installbin/perl$exe_ext", "$installbin/suidperl$exe_ext");
-    &link("$installbin/perl$ver$exe_ext", "$installbin/perl$exe_ext");
-    &link("$installbin/sperl$ver$exe_ext", "$installbin/suidperl$exe_ext") 
-      if $d_dosuid;
-}
-
-if (!$versiononly && ! &samepath($installbin, 'x2p')) {
-    &safe_unlink("$installbin/a2p$exe_ext");
-    &cmd("cp x2p/a2p$exe_ext $installbin/a2p$exe_ext");
-    &chmod(0755, "$installbin/a2p$exe_ext");
-}
-
-# cppstdin is just a script, but it is architecture-dependent, so
-# it can't safely be shared.  Place it in $installbin.
-# Note that Configure doesn't build cppstin if it isn't needed, so
-# we skip this if cppstdin doesn't exist.
-if (! $versiononly && (-f cppstdin) && (! &samepath($installbin, '.'))) {
-    &safe_unlink("$installbin/cppstdin");
-    &cmd("cp cppstdin $installbin/cppstdin");
-    &chmod(0755, "$installbin/cppstdin");
-}
-
-# Install scripts.
-
-mkpath($installscript, 1, 0777);
-
-if (! $versiononly) {
-    for (@scripts) {
-        &cmd("cp $_ $installscript");
-        s#.*/##; &chmod(0755, "$installscript/$_");
-    }
-}
-
-# pstruct should be a link to c2ph
-
-if (! $versiononly) {
-    &safe_unlink("$installscript/pstruct");
-    &link("$installscript/c2ph","$installscript/pstruct");
-}
-
-# Install pod pages.  Where? I guess in $installprivlib/pod.
-
-if (! $versiononly && !($installprivlib =~ m/\Q$]/)) {
-    mkpath("${installprivlib}/pod", 1, 0777);
-    foreach $file (@pods) {
-       # $file is a name like  pod/perl.pod
-       cp_if_diff($file, "${installprivlib}/${file}");
-    }
-}
-
 # Install library files.
 
 $do_installarchlib = $do_installprivlib = 0;
@@ -216,6 +163,59 @@ if (!$versiononly && !$nonono && -t STDIN && -t STDERR
     }
 }
 
+# Make links to ordinary names if installbin directory isn't current directory.
+
+if (! $versiononly && ! &samepath($installbin, '.')) {
+    &safe_unlink("$installbin/perl$exe_ext", "$installbin/suidperl$exe_ext");
+    &link("$installbin/perl$ver$exe_ext", "$installbin/perl$exe_ext");
+    &link("$installbin/sperl$ver$exe_ext", "$installbin/suidperl$exe_ext") 
+      if $d_dosuid;
+}
+
+if (!$versiononly && ! &samepath($installbin, 'x2p')) {
+    &safe_unlink("$installbin/a2p$exe_ext");
+    &cmd("cp x2p/a2p$exe_ext $installbin/a2p$exe_ext");
+    &chmod(0755, "$installbin/a2p$exe_ext");
+}
+
+# cppstdin is just a script, but it is architecture-dependent, so
+# it can't safely be shared.  Place it in $installbin.
+# Note that Configure doesn't build cppstin if it isn't needed, so
+# we skip this if cppstdin doesn't exist.
+if (! $versiononly && (-f cppstdin) && (! &samepath($installbin, '.'))) {
+    &safe_unlink("$installbin/cppstdin");
+    &cmd("cp cppstdin $installbin/cppstdin");
+    &chmod(0755, "$installbin/cppstdin");
+}
+
+# Install scripts.
+
+mkpath($installscript, 1, 0777);
+
+if (! $versiononly) {
+    for (@scripts) {
+        &cmd("cp $_ $installscript");
+        s#.*/##; &chmod(0755, "$installscript/$_");
+    }
+}
+
+# pstruct should be a link to c2ph
+
+if (! $versiononly) {
+    &safe_unlink("$installscript/pstruct");
+    &link("$installscript/c2ph","$installscript/pstruct");
+}
+
+# Install pod pages.  Where? I guess in $installprivlib/pod.
+
+if (! $versiononly && !($installprivlib =~ m/\Q$]/)) {
+    mkpath("${installprivlib}/pod", 1, 0777);
+    foreach $file (@pods) {
+       # $file is a name like  pod/perl.pod
+       cp_if_diff($file, "${installprivlib}/${file}");
+    }
+}
+
 # Check to make sure there aren't other perls around in installer's
 # path.  This is probably UNIX-specific.  Check all absolute directories
 # in the path except for where public executables are supposed to live.
@@ -230,9 +230,9 @@ if (!$versiononly) {
     @otherperls = ();
     for (@path) {
        next unless m,^/,;
-       next if ($_ eq $binexp);
        # Use &samepath here because some systems have other dirs linked
        # to $mainperldir (like SunOS)
+       next if &samepath($_, $binexp);
        next if ($mainperl_is_instperl && &samepath($_, $mainperldir));
        push(@otherperls, "$_/perl$exe_ext")
            if (-x "$_/perl$exe_ext" && ! -d "$_/perl$exe_ext");