This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make MULTICALL handle list context
Currently in something like
for (1,2) { return 3,4 }
the user of MULTICALL will see 1,2,3,4 returned, because in pp_return,
MULTICALL is handled as a special case, and that special-case code doesn't
handle list context.
A simple fix is just to remove the special handling in pp_return.
Allow a MULTICALL return to pass through the normal pp_return stack
manging code, then tail call pp_leavesub or pp_leavesublv as approriate.
Both those subs do an immeidate 'return 0' if CxMULTICALL().
As well as fixing list context MULTICALL, it removes one extra condition
in the path of a normal return.