summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-01-14 00:00:26 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-01-14 00:00:26 -0800
commit31b139ba853d7a7a7b30c4c0e7a90020a641854d (patch)
treeaba9b53e83b9e20a05d0ff4a89c8b7666107e1c7 /doio.c
parent21a64c3ee03cc1a361f10224a63c36ef3523d3d8 (diff)
downloadperl-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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/doio.c b/doio.c
index b0c5a690c5..1a031034ac 100644
--- a/doio.c
+++ b/doio.c
@@ -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)