summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-09-26 08:47:28 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-09-26 08:55:12 -0700
commit85ffec368212c676791d13ff9743912238325bc2 (patch)
tree043450b1073754b2f274ac86b2e80786978300e8 /op.c
parent9c62c74d253b05d5e0ec6c62885030bfbe5ccda3 (diff)
downloadperl-85ffec368212c676791d13ff9743912238325bc2.tar.gz
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.
Diffstat (limited to 'op.c')
-rw-r--r--op.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/op.c b/op.c
index d074c0c8a5..dfc1cd7b1a 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: