Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
hippo messaged me that

> FYI, the default recursion limit is "only" 100.

I knew, but when in tested in the debugger I only saw

1000 levels deep in subroutine calls!

It seems that the debugger has a hard breakpoint at 1000 and doesn't show the normal "deep recursion" warning.

Tested with 5.32 on Win.


use strict; use warnings; our $limit =1050; our $l=0; sub tst { $l++; #warn "level: $l" unless $l%50; die "LIMIT $limit reached" if $l>$limit; tst(); } tst();
in debugger
D:\tmp\pm>perl -d Loading DB routines from version 1.57 Editor support available. Enter h or 'h h' for help, or 'perldoc perldebug' for more help. main::( our $limit =1050; DB<1> c main::tst( $l++; 1000 levels deep in subroutine calls! DB<1>

normal run

D:\tmp\pm>perl Deep recursion on subroutine "main::tst" at line 12. LIMIT 1050 reached at line 11. D:\tmp\pm>

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

In reply to Re^6: Is it safe to use external strings for regexes? ("deep recursion" in Debugger) by LanX
in thread Is it safe to use external strings for regexes? by stevieb

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2022-05-20 16:24 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (75 votes). Check out past polls.