summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-12-05 21:41:30 -0800
committerFather Chrysostomos <sprout@cpan.org>2014-12-06 05:33:30 -0800
commit8b9fb2f9f022bfdeca1048b3797b844142826a9c (patch)
tree7fe0dc68f79b792f3e4f9a136ae2080a7f6c8128 /perly.y
parent6436970cde5c8aac6df90c1710576d85946042e4 (diff)
downloadperl-8b9fb2f9f022bfdeca1048b3797b844142826a9c.tar.gz
Deparse formats in the right spot
Formats need the same logic applied in 34b54951568, to avoid this: Input: { my $x; format STDOUT = @ $x . } __END__ $ pbpaste|./perl -Ilib -MO=Deparse { my $x; } format STDOUT = @ $x . __DATA__ - syntax OK That $x in the format is now global, not lexical. Also, we need to make sure the sequence numbers are correct. The statement after the format stopped having a higher sequence number than CvOUTSIDE_SEQ(format) in 8635e3c238f, because the ‘pending’ sequence number set aside for the nextstate op created just after com- pile-time block exit (which nextstate op comes before the block) was not actually being used by newFORM (unlike newATTRSUB), so the follow- ing statement was using that number.
Diffstat (limited to 'perly.y')
-rw-r--r--perly.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/perly.y b/perly.y
index 6ba61aebba..64fc6acfd1 100644
--- a/perly.y
+++ b/perly.y
@@ -263,6 +263,7 @@ barestmt: PLUGSTMT
SvREFCNT_inc_simple_void(fmtcv);
pad_add_anon(fmtcv, OP_NULL);
}
+ parser->parsed_sub = 1;
}
| SUB subname startsub
{