diff options
author | Artur Bergman <sky@nanisky.com> | 2003-10-30 22:01:35 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2003-10-30 22:18:53 +0000 |
commit | 2d981f2701e9f92843f194f91d9b984eefa4793e (patch) | |
tree | d300f345d05dd8b67c79e737892eb0b9fbe5cc85 /op.c | |
parent | d8012aafdb274a91ce4d5cb2e6453548a3aa2dd5 (diff) | |
download | perl-2d981f2701e9f92843f194f91d9b984eefa4793e.tar.gz |
Fix for the orange lion bug - aka empty sub bug
Message-Id: <A10EEA90-0B24-11D8-93CD-000A95A2734C@nanisky.com>
p4raw-id: //depot/perl@21582
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -6277,6 +6277,17 @@ Perl_peep(pTHX_ register OP *o) o->op_seq = PL_op_seqmax++; break; case OP_STUB: + if(!oldop && + o->op_next && + o->op_next->op_type == OP_LEAVESUB) { + OP* newop = newSTATEOP(0, Nullch, 0); + newop->op_next = o->op_next; + o->op_next = 0; + op_free(o); + o = newop; + ((UNOP*)o->op_next)->op_first = newop; + CvSTART(PL_compcv) = newop; + } if ((o->op_flags & OPf_WANT) != OPf_WANT_LIST) { o->op_seq = PL_op_seqmax++; break; /* Scalar stub must produce undef. List stub is noop */ |