Normally s/// returns a count of the number of iterations, but
as an optimisation, in boolean context it returns PL_sv_yes/PL_sv_zero
instead. But in the places where it decides which immortal var to return,
the number of iterations is always > 0, so PL_sv_zero never gets returned.
So skip testing whether iters > 0 and always just return PL_sv_yes.
(In non-boolean scalar context, it still returns the iteration count as
before.)
Move(s, d, i+1, char); /* include the NUL */
}
SPAGAIN;
Move(s, d, i+1, char); /* include the NUL */
}
SPAGAIN;
if (PL_op->op_private & OPpTRUEBOOL)
if (PL_op->op_private & OPpTRUEBOOL)
- PUSHs(iters ? &PL_sv_yes : &PL_sv_zero);
SPAGAIN;
if (PL_op->op_private & OPpTRUEBOOL)
SPAGAIN;
if (PL_op->op_private & OPpTRUEBOOL)
- PUSHs(iters ? &PL_sv_yes : &PL_sv_zero);