Thanks for taking the time to write up such a thorough reply.

I suspected that there may be no way in perl but was hoping that a guru might pop up and say something like:

BEGIN { use DB; DB::__initdebugger() }
or alternatively, respond with an authoritative "No".

Some variant of your first response would suit my need, although for now I'll just continue using "perl -d ./script.pl" or "make testdb" when required. I really am just curious. The least I can do in response to your effort is provide you the context that provoked the question:

You haven't told us what it is that you need from the debugger
I actually want to use it interactively. While writing a module, I'm also writing a companion script that sets up a few objects and conditionally runs tests on them and/or leaves me at the debugging prompt. Then I can play around, debug, try things, interactively write new tests, etc. Nothing special


In reply to Re: perl -d at runtime? by bsb
in thread perl -d at runtime? by bsb

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.