in reply to Deep recursion error using LibXML
Deep recursion is a problematic warning as perfectly legitimate code can emit it, and that code is not always under your control. That's the case here.
In 5.12, 100 levels of recursion triggers the warning, but I think the count that triggers the warning was increased at some point. This could have been after the rather old 5.8.8 you are using. Upgrading (perhaps even to 5.8.9) might solve the issue.
Alternative, you could use a warning handler to suppress that warning.
local $SIG{__WARN__} = sub { return if $_[0] =~ /^Deep recursion /; local $\; print STDERR $_[0]; };
or
my $prev_handler = $SIG{__WARN__}; local $SIG{__WARN__} = sub { return if $_[0] =~ /^Deep recursion /; local $SIG{__WARN__} = $prev_handler; warn($_[0]); };
Update: What changed was that a limit that was hardcoded became a define (PERL_SUB_DEPTH_WARN) you could change when you build perl.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Deep recursion error using LibXML
by mertserger (Curate) on Dec 31, 2010 at 11:11 UTC |