summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-01-13 23:38:57 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-01-13 23:38:57 -0800
commiteb4c377af757baa899bb66137d53187fcea634db (patch)
treebbe73115472d6aeea38c6dcb5b5b1808905e7afe /pp_sys.c
parent93fad9301a05ccd2d02b9949ee59a69708b508e1 (diff)
downloadperl-eb4c377af757baa899bb66137d53187fcea634db.tar.gz
Make -T _ and -B _ always set PL_laststatval
-T _ and -B _ always do another stat() on the previous file handle or filename, unless it is a handle that has been closed. Normally, the internal stat buffer, status, etc., are reset even for _. This happens even on a failed fstat(). -T HANDLE and -B HANDLE currently *do* reset the stat status (PL_laststatval) if there is no IO thingy, so having -T _ and -B _ not do that makes things needlessly inconsistent.
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 9d5c09c132..1a84e109e7 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3329,10 +3329,10 @@ PP(pp_fttext)
}
else {
PL_statgv = gv;
- PL_laststatval = -1;
sv_setpvs(PL_statname, "");
io = GvIO(PL_statgv);
}
+ PL_laststatval = -1;
if (io && IoIFP(io)) {
if (! PerlIO_has_base(IoIFP(io)))
DIE(aTHX_ "-T and -B not implemented on filehandles");