diff -ru ExtUtils-Manifest-1.50-orig/lib/ExtUtils/Manifest.pm ExtUtils-Manifest-1.50/lib/ExtUtils/Manifest.pm
--- ExtUtils-Manifest-1.50-orig/lib/ExtUtils/Manifest.pm 2006-12-23 07:40:21.000000000 +1100
+++ ExtUtils-Manifest-1.50/lib/ExtUtils/Manifest.pm 2007-01-08 17:45:05.096279547 +1100
@@ -522,7 +522,7 @@
copy($srcFile,$dstFile);
utime $access, $mod + ($Is_VMS ? 1 : 0), $dstFile;
- _manicopy_chmod($dstFile);
+ _manicopy_chmod($srcFile, $dstFile);
}
@@ -531,7 +531,7 @@
return &cp if $Is_VMS or ($^O eq 'MSWin32' and Win32::IsWin95());
link($srcFile, $dstFile);
- unless( _manicopy_chmod($dstFile) ) {
+ unless( _manicopy_chmod($srcFile, $dstFile) ) {
unlink $dstFile;
return;
}
@@ -542,10 +542,10 @@
# 2) Let everyone read it.
# 3) If the owner can execute it, everyone can.
sub _manicopy_chmod {
- my($file) = shift;
+ my($srcFile, $dstFile) = @_;
- my $perm = 0444 | (stat $file)[2] & 0700;
- chmod( $perm | ( $perm & 0100 ? 0111 : 0 ), $file );
+ my $perm = 0444 | (stat $srcFile)[2] & 0700;
+ chmod( $perm | ( $perm & 0100 ? 0111 : 0 ), $dstFile );
}
# Files that are often modified in the distdir. Don't hard link them.
diff -ru ExtUtils-Manifest-1.50-orig/t/Manifest.t ExtUtils-Manifest-1.50/t/Manifest.t
--- ExtUtils-Manifest-1.50-orig/t/Manifest.t 2006-12-23 06:57:21.000000000 +1100
+++ ExtUtils-Manifest-1.50/t/Manifest.t 2007-01-08 17:43:56.275183144 +1100
@@ -19,6 +19,7 @@
use File::Spec;
use File::Path;
use File::Find;
+use Config;
my $Is_VMS = $^O eq 'VMS';
@@ -71,6 +72,12 @@
ok( chdir( 'mantest' ), 'chdir() to mantest' );
ok( add_file('foo'), 'add a temporary file' );
+# This ensures the -x check for manicopy means something
+# Some platforms don't have chmod or an executable bit, in which case
+# this call will do nothing or fail, but on the platforms where chmod()
+# works, we test the executable bit is copied
+chmod( 0744, 'foo') if $Config{'chmod'};
+
# there shouldn't be a MANIFEST there
my ($res, $warn) = catch_warning( \&mkmanifest );
# Canonize the order.