diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-10-24 05:41:17 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-10-24 05:41:17 -0700 |
commit | a373464fd655c7246cf689f421efc503307b705c (patch) | |
tree | 5ef4595eced510b2ea8b5cc6548e9f87c82beb09 /pp_ctl.c | |
parent | a9b7658f66b4773c3d3b573410a0bc5963f7e279 (diff) | |
download | perl-a373464fd655c7246cf689f421efc503307b705c.tar.gz |
Fix bare blocks in lvalue subs
If a bare block is the last thing in an lvalue sub, OP_LEAVELOOP needs
to propagate lvalue context and handle returned arrays properly, just
as OP_LEAVE has done since yesterday.
This is a follow-up to 2ec7f6f24289. This came up in ticket #119797.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2277,7 +2277,8 @@ PP(pp_leaveloop) newsp = PL_stack_base + cx->blk_loop.resetsp; TAINT_NOT; - SP = adjust_stack_on_leave(newsp, SP, MARK, gimme, 0, FALSE); + SP = adjust_stack_on_leave(newsp, SP, MARK, gimme, 0, + PL_op->op_private & OPpLVALUE); PUTBACK; POPLOOP(cx); /* Stack values are safe: release loop vars ... */ |