diff options
author | Simon Cozens <simon@netthink.co.uk> | 2000-12-10 19:06:19 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-11 15:35:07 +0000 |
commit | 1e1dbab6eed49955498a66ce3beedbd7ea33dc21 (patch) | |
tree | e28c26af071f6ca2caa7951953b0623527d8a0b2 /ext | |
parent | 7d3a9d88333294f7510d5755825d4f26422ffba1 (diff) | |
download | perl-1e1dbab6eed49955498a66ce3beedbd7ea33dc21.tar.gz |
Re: [ID 20001204.007] -MO=Deparse -we '{234;}' failing
Message-ID: <20001210190619.B21402@deep-dark-truthful-mirror.perlhacker.org>
p4raw-id: //depot/perl@8079
Diffstat (limited to 'ext')
-rw-r--r-- | ext/B/B/Deparse.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm index 7d1675290b..37c08554c9 100644 --- a/ext/B/B/Deparse.pm +++ b/ext/B/B/Deparse.pm @@ -1792,7 +1792,7 @@ sub pp_leaveloop { my $state = $kid->first; my $cuddle = $self->{'cuddle'}; my($expr, @exprs); - for (; $$state != $$cont; $state = $state->sibling) { + for (; $$state != $$cont and can $state "sibling"; $state = $state->sibling) { $expr = ""; if (is_state $state) { $expr = $self->deparse($state, 0); @@ -1803,8 +1803,12 @@ sub pp_leaveloop { push @exprs, $expr if $expr; } $kid = join(";\n", @exprs); + if (class($cont) eq "LISTOP") { $cont = $cuddle . "continue {\n\t" . $self->deparse($cont, 0) . "\n\b}\cK"; + } else { + $cont = "\cK"; + } } else { $cont = "\cK"; $kid = $self->deparse($kid, 0); |