This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
'$! = EACCESS; require ...' could fail
authorDavid Mitchell <davem@iabyn.com>
Mon, 28 Oct 2013 16:39:35 +0000 (16:39 +0000)
committerDavid Mitchell <davem@iabyn.com>
Tue, 29 Oct 2013 12:46:41 +0000 (12:46 +0000)
commitb2da7ead6803119763b139be37b2cc8c8f522f75
treebb5f478b0babd1746c0a2af0fed4b2bee8e1870b
parent5a72d597d63bb674291c738afe00d11ae93eff4b
'$! = EACCESS; require ...' could fail

When require is checking against a particular entry in @INC, it stats the
potential pathname, and does various checks like skipping if it's a
directory. In this case the stat succeeds, so $! is left unchanged.
Later however, pp_require() checks for $! being EACCES. So if $! was
already set before the require, this could influence require's behaviour.
pp_ctl.c
t/comp/require.t