Change 33860 by [EMAIL PROTECTED] on 2008/05/19 10:21:04

        Converge some changes from installperl into installman. I have a
        suspicion that installman is only run on *nix and OS/2, not Win32 or
        VMS. Specifically
        sub unlink   - return scalar(@names) if $Is_VMS # from change 854
        sub link     - change warn to die               # from change 4774
        sub samepath - case insensitive name comparison # from change 311
        (in the ansiperl branch, merged via the win32 branch)

Affected files ...

... //depot/perl/installman#51 edit

Differences ...

==== //depot/perl/installman#51 (xtext) ====
Index: perl/installman
--- perl/installman#50~32212~   2007-11-02 07:55:29.000000000 -0700
+++ perl/installman     2008-05-19 03:21:04.000000000 -0700
@@ -36,6 +36,16 @@
 use Pod::Man;
 use subs qw(unlink chmod rename link);
 use vars qw($packlist);
+use vars qw($Is_VMS $Is_W32 $Is_OS2 $Is_Cygwin $Is_Darwin $Is_NetWare);
+
+BEGIN {
+    $Is_VMS = $^O eq 'VMS';
+    $Is_W32 = $^O eq 'MSWin32';
+    $Is_OS2 = $^O eq 'os2';
+    $Is_Cygwin = $^O eq 'cygwin';
+    $Is_Darwin = $^O eq 'darwin';
+    if ($Is_VMS) { eval 'use VMS::Filespec;' }
+}
 
 if ($Config{d_umask}) {
     umask(022); # umasks like 077 aren't that useful for installations
@@ -241,6 +251,8 @@
     my(@names) = @_;
     my $cnt = 0;
 
+    return scalar(@names) if $Is_VMS;
+
     foreach my $name (@names) {
        next unless -e $name;
        chmod 0777, $name if $^O eq 'os2';
@@ -261,7 +273,7 @@
             ? $success++
             : ($from =~ m#^/afs/# || $to =~ m#^/afs/#)
               ? die "AFS"  # okay inside eval {}
-              : warn "Couldn't link $from to $to: $!\n"
+              : die "Couldn't link $from to $to: $!\n"
           unless $opts{notify};
     };
     if ($@) {
@@ -299,6 +311,8 @@
     my($p1, $p2) = @_;
     my($dev1, $ino1, $dev2, $ino2);
 
+    return (lc($p1) eq lc($p2)) if ($Is_W32 || $Is_NetWare);
+
     if ($p1 ne $p2) {
        ($dev1, $ino1) = stat($p1);
        ($dev2, $ino2) = stat($p2);
End of Patch.

Reply via email to