Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
The stupid question is the question not asked
 
PerlMonks  

Re^2: Deep recursion problem

by hexcoder (Friar)
on Feb 01, 2013 at 16:37 UTC ( #1016584=note: print w/ replies, xml ) Need Help??


in reply to Re: Deep recursion problem
in thread Deep recursion problem

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."

Hmmm... there are two cases: with or without running the debugger. I assume you meant the case without the debugger.

With the debugger, one can set the threshold higher than 100 interactively prior to running the program, for example:

DB<1> $DB::deep=1000 DB<2> ...

This is now part of my debugger initialization file.


Comment on Re^2: Deep recursion problem
Download Code
Re^3: Deep recursion problem
by ikegami (Pope) on Feb 11, 2013 at 23:02 UTC

    Hmmm... there are two cases: with or without running the debugger. I assume you meant the case without the debugger.

    No, I meant what I said. $DB::deep has no effect on the warning. Ever.

    With the debugger, one can set the threshold higher than 100 interactively prior to running the program

    That's not true.

    >perl -dwe"$DB::deep = 1000; sub f { f($_[0]-1) if $_[0]; } f(150);" Loading DB routines from perl5db.pl version 1.37 Editor support available. Enter h or 'h h' for help, or 'perldoc perldebug' for more help. main::(-e:1): $DB::deep = 1000; sub f { f($_[0]-1) if $_[0]; } f(150 +); DB<1> r Deep recursion on subroutine "main::f" at C:/Progs/perl5161-ap1601/lib +/perl5db.pl line 3550. at C:/Progs/perl5161-ap1601/lib/perl5db.pl line 3550. ...

    See the post to which you replied if you want to know what $DB::deep actually does.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016584]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (12)
As of 2014-04-17 10:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (444 votes), past polls