Subject: | [PATCH] 'make test' failures on Win32/Cygwin |
'make test' for ExtUtils-Install produces the following:
t/can_write_dir......
# Failed test at t/can_write_dir.t line 48.
# Structures begin differing at:
# $got->[0] = '1'
# $expected->[0] = '0'
# Failed test at t/can_write_dir.t line 49.
# Structures begin differing at:
# $got->[0] = '1'
# $expected->[0] = '0'
# Looks like you failed 2 tests of 13.
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/13 subtests
This is caused by the fact that POSIX::access is broken
for Win32 and Cygwin: It returns "0 but true" for both
writable and non-writable directories.
The attached patch corrects the problem by forcing the
use of (-w $dir) on Win32 and Cygwin.
Subject: | ExtUtils-Install.patch |
--- ExtUtils-Install/lib/ExtUtils/Install.pm
+++ ExtUtils-Install/lib/ExtUtils/Install.pm
@@ -351,7 +351,7 @@
my $has_posix;
sub _have_write_access {
my $dir=shift;
- if (!defined $has_posix) {
+ if (!$Is_cygwin && !$Is_Win32 && !defined $has_posix) {
$has_posix=eval 'local $^W; require POSIX; 1' || 0;
}
if ($has_posix) {