This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Restore special blocks to working order
authorFather Chrysostomos <sprout@cpan.org>
Wed, 26 Sep 2012 20:12:57 +0000 (13:12 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 26 Sep 2012 20:13:54 +0000 (13:13 -0700)
commitd699ecb701ac42e5f50b4ec00c162c4dc9532b91
treec3dd99b645b5c7aa5c5de7815437a607c0aaf48b
parent02c01adb33bc4dde0147539d95b275937329f6c4
Restore special blocks to working order

I accidentally broke these in commit 85ffec3682, yet everything passed
for me under threads+mad.

PL_compcv is usually restored to its previous value at the end of
newATTRSUB when LEAVE_SCOPE is called.  But BEGIN blocks are called
before that.  I needed PL_compcv to be restored to its previ-
ous value before it was called, so I added LEAVE_SCOPE before
process_special_blocks.

But that caused the name to be freed before S_process_special_blocks
got a chance to look at it.

So I have now added a new parameter to S_process_special_blocks to
allow *it* to call LEAVE_SCOPE after it determines that it is a BEGIN
block, but before it calls it.
embed.fnc
embed.h
op.c
proto.h
scope.h