From: Father Chrysostomos Date: Wed, 26 Sep 2012 15:47:28 +0000 (-0700) Subject: Make PL_compcv visible to BEGIN blocks X-Git-Tag: upstream/5.20.0~5299 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=85ffec368212c676791d13ff9743912238325bc2;p=platform%2Fupstream%2Fperl.git Make PL_compcv visible to BEGIN blocks This allows BEGIN { XS_func(); } to access the currently-com- piling pad. BEGIN blocks were unlike any other subroutine or special block in that PL_compcv would be set to the BEGIN block itself at run time. --- diff --git a/op.c b/op.c index d074c0c..dfc1cd7 100644 --- a/op.c +++ b/op.c @@ -7663,7 +7663,10 @@ Perl_newATTRSUB_flags(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, } if (name && ! (PL_parser && PL_parser->error_count)) + { + LEAVE_SCOPE(floor); process_special_blocks(name, gv, cv); + } } done: