diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-01-14 00:00:26 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-01-14 00:00:26 -0800 |
commit | 31b139ba853d7a7a7b30c4c0e7a90020a641854d (patch) | |
tree | aba9b53e83b9e20a05d0ff4a89c8b7666107e1c7 /doio.c | |
parent | 21a64c3ee03cc1a361f10224a63c36ef3523d3d8 (diff) | |
download | perl-31b139ba853d7a7a7b30c4c0e7a90020a641854d.tar.gz |
Make -l HANDLE set PL_laststatval with fatal warnings
Fatal warnings were preventing it from being set, because the warning
came first.
(PL_laststatval records the success status of the previous stat.)
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1336,12 +1336,13 @@ Perl_my_lstat_flags(pTHX_ const U32 flags) Perl_croak(aTHX_ no_prev_lstat); return PL_laststatval; } + PL_laststatval = -1; if (ckWARN(WARN_IO)) { Perl_warner(aTHX_ packWARN(WARN_IO), "Use of -l on filehandle %"HEKf, HEKfARG(GvENAME_HEK(cGVOP_gv))); } - return (PL_laststatval = -1); + return -1; } else if (PL_op->op_private & OPpFT_STACKED) { if (PL_laststype != OP_LSTAT) |