plan(tests => 115);
use Config;
-use Errno qw(EISDIR);
+use Errno qw(EACCES EISDIR);
# due to a bug in VMS's piping which makes it impossible for runperl()
# to emulate echo -n (ie. stdin always winds up with a newline), these
# Win32 won't let us open the directory, so we never get to die with
# EISDIR, which happens after open.
- my $eisdir = do { local $! = EISDIR; "$!" };
- my $error = $^O eq 'MSWin32' ? 'Permission denied' : 'Is a directory';
+ my $error = do { local $! = $^O eq 'MSWin32' ? EACCES : EISDIR; "$!" };
like(
runperl( switches => [ '-c' ], args => [ $tempdir ], stderr => 1),
qr/Can't open perl script.*$tempdir.*\Q$error/s,