From 85ffec368212c676791d13ff9743912238325bc2 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Wed, 26 Sep 2012 08:47:28 -0700 Subject: [PATCH] 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. --- op.c | 3 +++ 1 file changed, 3 insertions(+) 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: -- 2.7.4