summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pp_sys.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 1ee14d7eb5..a3b7c51373 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3306,13 +3306,15 @@ PP(pp_fttext)
STACKED_FTEST_CHECK;
if (PL_op->op_flags & OPf_REF)
+ {
gv = cGVOP_gv;
+ EXTEND(SP, 1);
+ }
else if (PL_op->op_private & OPpFT_STACKED)
gv = PL_defgv;
else sv = POPs, gv = MAYBE_DEREF_GV_nomg(sv);
if (gv) {
- EXTEND(SP, 1);
if (gv == PL_defgv) {
if (PL_statgv)
io = SvTYPE(PL_statgv) == SVt_PVIO