Move the code which deals with setting the return value on perl's stack
ahead of the code which calculates which op to run next (the return value of
the C function).
static OP *
S_ft_stacking_return_false(pTHX_ SV *ret) {
- dSP;
OP *next = NORMAL;
- while (OP_IS_FILETEST(next->op_type)
- && next->op_private & OPpFT_STACKED)
- next = next->op_next;
+ dSP;
+
if (PL_op->op_flags & OPf_REF) XPUSHs(ret);
else SETs(ret);
PUTBACK;
+
+ while (OP_IS_FILETEST(next->op_type)
+ && next->op_private & OPpFT_STACKED)
+ next = next->op_next;
return next;
}