This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document string- and number-specific bitops in perlop
[perl5.git] / install_lib.pl
index 0a63574..1278ba7 100644 (file)
@@ -8,6 +8,7 @@ use vars qw($Is_VMS $Is_W32 $Is_OS2 $Is_Cygwin $Is_Darwin $Is_NetWare
            %opts $packlist);
 use subs qw(unlink link chmod);
 require File::Path;
+require File::Copy;
 
 BEGIN {
     require Config;
@@ -111,21 +112,20 @@ sub chmod {
       unless $opts{notify};
 }
 
-
 sub samepath {
     my($p1, $p2) = @_;
 
     return (lc($p1) eq lc($p2)) if ($Is_W32 || $Is_NetWare);
 
-    if ($p1 ne $p2) {
-       my($dev1, $ino1, $dev2, $ino2);
-       ($dev1, $ino1) = stat($p1);
-       ($dev2, $ino2) = stat($p2);
-       ($dev1 == $dev2 && $ino1 == $ino2);
-    }
-    else {
-       1;
-    }
+    return 1
+        if $p1 eq $p2;
+
+    my ($dev1, $ino1) = stat $p1;
+    return 0
+        unless defined $dev1;
+    my ($dev2, $ino2) = stat $p2;
+
+    return $dev1 == $dev2 && $ino1 == $ino2;
 }
 
 sub safe_rename {