diff options
author | Robin Houston <robin@cpan.org> | 2001-07-14 15:28:50 +0100 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-07-16 13:35:39 +0000 |
commit | 67fc2416631ce1ddf0bbad56564533900de2f291 (patch) | |
tree | 8e536f63ce7978b4a49700f6b9ba0b1b41435b3d /ext/B | |
parent | b29b78dec714eeadfd9076858df3bf80200162b3 (diff) | |
download | perl-67fc2416631ce1ddf0bbad56564533900de2f291.tar.gz |
formats can't contain formats
Message-Id: <20010714142850.A10205@robin>
p4raw-id: //depot/perl@11379
Diffstat (limited to 'ext/B')
-rw-r--r-- | ext/B/B/Deparse.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index 08f073e89d..4c8dc74bf9 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -768,8 +768,9 @@ sub deparse_format { my @text; local($self->{'curcv'}) = $form; local($self->{'curcvlex'}); + local($self->{'in_format'}) = 1; local(@$self{qw'curstash warnings hints'}) - = @$self{'curstash warnings hints'}; + = @$self{qw'curstash warnings hints'}; my $op = $form->ROOT; my $kid; $op = $op->first->first; # skip leavewrite, lineseq @@ -1064,7 +1065,7 @@ sub lineseq { } my $body = join(";\n", grep {length} @exprs); my $subs = ""; - if (defined $root && defined $limit_seq) { + if (defined $root && defined $limit_seq && !$self->{'in_format'}) { $subs = join "\n", $self->seq_subs($limit_seq); } return join(";\n", grep {length} $body, $subs); |