diff options
author | Zefram <zefram@fysh.org> | 2017-12-23 05:47:55 +0000 |
---|---|---|
committer | Zefram <zefram@fysh.org> | 2017-12-23 05:47:55 +0000 |
commit | b98da25d1df8fcfc0b2bcb79d46a7624d3d98ea5 (patch) | |
tree | 2cc7f0c1dbe17b2e1f160e9eaa424608907843e3 /pp_ctl.c | |
parent | 50a85cfe6c852deb0c2f738cb82006623052dc8e (diff) | |
download | perl-b98da25d1df8fcfc0b2bcb79d46a7624d3d98ea5.tar.gz |
make false whereso yield undef in scalar context
Fixes [perl #132634].
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -4616,8 +4616,11 @@ PP(pp_enterwhereso) to the op that follows the leavewhereso. RETURNOP calls PUTBACK which restores the stack pointer after the POPs. */ - if (!SvTRUEx(POPs)) + if (!SvTRUEx(POPs)) { + if (gimme == G_SCALAR) + PUSHs(&PL_sv_undef); RETURNOP(cLOGOP->op_other->op_next); + } cx = cx_pushblock(CXt_WHERESO, gimme, SP, PL_savestack_ix); cx_pushwhereso(cx); |