summaryrefslogtreecommitdiff
path: root/lib/CPAN.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CPAN.pm')
-rw-r--r--lib/CPAN.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CPAN.pm b/lib/CPAN.pm
index 3f3b980c11..401660ef44 100644
--- a/lib/CPAN.pm
+++ b/lib/CPAN.pm
@@ -19,6 +19,7 @@ use Config ();
use Cwd ();
use DirHandle;
use Exporter ();
+use Errno ();
use ExtUtils::MakeMaker (); # $SelfLoader::DEBUG=1;
use File::Basename ();
use File::Copy ();
@@ -575,7 +576,7 @@ Please make sure the directory exists and is writable.
}
my $fh;
unless ($fh = FileHandle->new(">$lockfile")) {
- if ($! =~ /Permission/) {
+ if ($!{EACCES} || $! =~ /Permission/) {
my $incc = $INC{'CPAN/Config.pm'};
my $myincc = MM->catfile($ENV{HOME},'.cpan','CPAN','MyConfig.pm');
$CPAN::Frontend->myprint(qq{