From: Vincent Pit Date: Thu, 31 Jul 2008 21:27:48 +0000 (+0200) Subject: Reverse logic for _recurse X-Git-Tag: v0.03~3 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=c230471832c1e52b30e3c3ffd8877718e9c8905c;p=perl%2Fmodules%2FB-RecDeparse.git Reverse logic for _recurse --- diff --git a/lib/B/RecDeparse.pm b/lib/B/RecDeparse.pm index 37eb150..7244ec5 100644 --- a/lib/B/RecDeparse.pm +++ b/lib/B/RecDeparse.pm @@ -82,7 +82,7 @@ sub new { } sub _recurse { - return $_[0]->{brd_level} >= 0 && $_[0]->{brd_cur} >= $_[0]->{brd_level} + return $_[0]->{brd_level} < 0 || $_[0]->{brd_cur} < $_[0]->{brd_level} } sub compile { @@ -125,7 +125,7 @@ sub pp_entersub { $self->{brd_sub} = 1; my $body = $self->SUPER::pp_entersub(@_); $self->{brd_sub} = 0; - $body =~ s/^&\s*(\w)/$1/ if not $self->_recurse; + $body =~ s/^&\s*(\w)/$1/ if $self->_recurse; return $body; } @@ -140,7 +140,7 @@ sub pp_refgen { sub pp_gv { my $self = shift; my $body; - if ($self->{brd_sub} <= 0 || $self->_recurse) { + if ($self->{brd_sub} <= 0 || !$self->_recurse) { $body = $self->SUPER::pp_gv(@_); } else { my $gv = $self->gv_or_padgv($_[0]);