in reply to Deep recursion problem
it has something to do with perl's depth limit being 100
It's not a limit. Perl will happily continue to recurse until it runs of memory. It just warns you when you reach a depth of 100.
and that there is a $DB:deep variable that allows you to change this depth.
No there isn't. $DB::deep instructs the debugger to break at a certain recursion depth. It has no effect outside the debugger, and it doesn't affect the warning because the warning is always disabled when using the debugger.
As stated in perldiag, "this threshold can be changed from 100, by recompiling the perl binary, setting the C pre-processor macro PERL_SUB_DEPTH_WARN to the desired value."
I'd like to have a very large array, use this recursive subroutine, and get no warnings
That's what no warnings 'recursion'; is for.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Deep recursion problem
by hexcoder (Curate) on Feb 01, 2013 at 16:37 UTC | |
by ikegami (Patriarch) on Feb 11, 2013 at 23:02 UTC |