This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Deparse: avoid deep recursion warning
authorDavid Mitchell <davem@iabyn.com>
Thu, 23 Feb 2017 13:41:35 +0000 (13:41 +0000)
committerDavid Mitchell <davem@iabyn.com>
Mon, 5 Jun 2017 11:52:17 +0000 (12:52 +0100)
sub _pessimise_walk_exe() recursively walks the optree, so can easily
exceed a depth of 100.

lib/B/Deparse.pm

index e482810..8e94ee6 100644 (file)
@@ -438,6 +438,8 @@ sub _pessimise_walk {
 sub _pessimise_walk_exe {
     my ($self, $startop, $visited) = @_;
 
+    no warnings 'recursion';
+
     return unless $$startop;
     return if $visited->{$$startop};
     my ($op, $prevop);