From: Robin Houston Date: Sat, 14 Jul 2001 14:28:50 +0000 (+0100) Subject: formats can't contain formats X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=67fc2416631ce1ddf0bbad56564533900de2f291;p=p5sagit%2Fp5-mst-13.2.git formats can't contain formats Message-Id: <20010714142850.A10205@robin> p4raw-id: //depot/perl@11379 --- diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index 08f073e..4c8dc74 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);