]> git.vpit.fr Git - perl/modules/B-RecDeparse.git/blobdiff - lib/B/RecDeparse.pm
Don't recurse into empty subroutines
[perl/modules/B-RecDeparse.git] / lib / B / RecDeparse.pm
index 12df138ed059273de20251c0a0818499bc07ccfa..f2b3660b4a881e6eceb6ab74b858127f079d4e69 100644 (file)
@@ -1,6 +1,6 @@
 package B::RecDeparse;
 
-use 5.008;
+use 5.008001;
 
 use strict;
 use warnings;
@@ -187,7 +187,8 @@ sub pp_gv {
  my $seen = $self->{brd_seen};
 
  my $body;
- if (!$self->{brd_sub} or !$self->_recurse or $seen->{$name} or !$$cv) {
+ if (!$self->{brd_sub} or !$self->_recurse or $seen->{$name} or !$$cv
+     or !$cv->isa('B::CV') or $cv->ROOT->isa('B::NULL')) {
   $body = $self->SUPER::pp_gv(@_);
  } else {
   $body = do {
@@ -229,6 +230,8 @@ An object-oriented module shouldn't export any function, and so does this one.
 
 =head1 DEPENDENCIES
 
+L<perl> 5.8.1.
+
 L<Carp> (standard since perl 5), L<Config> (since perl 5.00307) and L<B::Deparse> (since perl 5.005).
 
 =head1 AUTHOR