Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hm. Might be able to do it by altering sub eval() ... yes, quite easily!

Setting $DB::onetimeDump to 'dump' and calling DB::eval will do exactly what you want. Try this in your .perldb:

sub DB::new_eval { local $DB::onetimeDump = 'dump'; &DB::old_eval(@_); + } *DB::old_eval = \&DB::eval; *DB::eval = \&DB::new_eval;
It's perldb.ini if you're on Windows. You get output like this:
[tearought-lm|(none)]04:54 PM $ perl -de0 Loading DB routines from perl5db.pl version 1.31 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(-e:1): 0 DB<1> [1..10] 0 ARRAY(0x800cc0) 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 DB<2>
This is just copying the old eval to a new name, creating a new sub that calls it after setting up $onetimeDump property, and substituting the new sub for the old one. it's not perfect:
DB<4> print "my father plays dominos\n" my father plays dominos 0 1 DB<5>
but should basically do what you're looking for. You'd need to patch up the dumping function a little more for perfection.

In reply to Re^5: [perldebugger] calling perldoc from within the debugger (inifile) by pemungkah
in thread [perldebugger] calling perldoc from within the debugger by LanX

Title:
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 How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-16 18:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found