Subject: | POSIX::access never used in _have_write_access |
Currently there's the line
$has_posix=eval "local $^W; require POSIX; 1" || 0;
in ExtUtils::Install::_have_write_access, which is a actually always a
syntax error:
$perl -e 'eval "local $^W; require POSIX; 1"; warn $@'
Can't modify constant item in local at (eval 1) line 1, at EOF
To fix just use single quotes in the eval. A patch is attached.
This actually helps sometimes on cygwin where one cannot always trust
the return value of -w.
Regards,
Slaven
Subject: | ExtUtils-Install-access.patch |
#### Patch data follows ####
diff -up '../build/ExtUtils-Install-1.44-SSvchy/lib/ExtUtils/Install.pm' 'ExtUtils-Install-1.44-SSvchy/lib/ExtUtils/Install.pm'
Index: ./lib/ExtUtils/Install.pm
--- ./lib/ExtUtils/Install.pm Mon Sep 10 01:17:23 2007
+++ ./lib/ExtUtils/Install.pm Fri Feb 15 22:38:33 2008
@@ -395,7 +395,7 @@ Abstract a -w check that tries to use PO
sub _have_write_access {
my $dir=shift;
if (!defined $has_posix) {
- $has_posix=eval "local $^W; require POSIX; 1" || 0;
+ $has_posix=eval q{local $^W; require POSIX; 1} || 0;
}
if ($has_posix) {
return POSIX::access($dir, POSIX::W_OK());
#### End of Patch data ####