X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FB%2FRecDeparse.pm;h=12df138ed059273de20251c0a0818499bc07ccfa;hb=3f86aade0125d81087495585dc71c827858428be;hp=a9ace562920d0a516f32958bcc93b4f41f35e9a6;hpb=055d88b751d7e3d19bb94c3d734bbfcedee19276;p=perl%2Fmodules%2FB-RecDeparse.git diff --git a/lib/B/RecDeparse.pm b/lib/B/RecDeparse.pm index a9ace56..12df138 100644 --- a/lib/B/RecDeparse.pm +++ b/lib/B/RecDeparse.pm @@ -37,13 +37,16 @@ our $VERSION = '0.04'; This module extends L by making it recursively replace subroutine calls encountered when deparsing. -Please refer to L documentation for what to do and how to do it. Besides the constructor syntax, everything should work the same for the two modules. +Please refer to L documentation for what to do and how to do it. +Besides the constructor syntax, everything should work the same for the two modules. =head1 METHODS =head2 C<< new < deparse => [ @B__Deparse_opts ], level => $level > >> -The L object constructor. You can specify the underlying L constructor arguments by passing a string or an array reference as the value of the C key. The C option expects an integer that specifies how many levels of recursions are allowed : C<-1> means infinite while C<0> means none and match L behaviour. +The L object constructor. +You can specify the underlying L constructor arguments by passing a string or an array reference as the value of the C key. +The C option expects an integer that specifies how many levels of recursions are allowed : C<-1> means infinite while C<0> means none and match L behaviour. =cut @@ -180,10 +183,11 @@ sub pp_gv { my $gv = $self->gv_or_padgv($_[0]); my $name = $gv->NAME; + my $cv = $gv->CV; my $seen = $self->{brd_seen}; my $body; - if ($self->{brd_sub} <= 0 || !$self->_recurse || $seen->{$name}) { + if (!$self->{brd_sub} or !$self->_recurse or $seen->{$name} or !$$cv) { $body = $self->SUPER::pp_gv(@_); } else { $body = do { @@ -214,7 +218,8 @@ sub pp_gv { =head2 C -Functions and methods from L reimplemented by this module. Never call them directly. +Functions and methods from L reimplemented by this module. +Never call them directly. Otherwise, L inherits all methods from L. @@ -234,7 +239,8 @@ You can contact me by mail or on C (vincent). =head1 BUGS -Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. +Please report any bugs or feature requests to C, or through the web interface at L. +I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SUPPORT