Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jplindstrom (594)

jplindstrom
  (email not shown publicly)

Journal of jplindstrom (594)

Wednesday September 12, 2007
11:47 AM

Don't dump everything in the entire world please

[ #34427 ]

When dumping deeply nested data structures (like DBIC objects) and the indentation level wraps around the width of the shell yet another time, it's time to start doing this first:

local $Data::Dumper::Maxdepth = 3;

In the debugger, using "x" to dump, it's:

x [maxdepth] expr

This can also be set with the dumpDepth option so you don't have to care about it all the time:

o dumpDepth=3

In the debugger, using the excellent "r" to continue until return of sub, it also insists on dumping the return value (which you rarely care about, you just want to get out of the damn sub), unset the PrintRet option first.

o PrintRet=0

Put these in the .perldb init file in ./ or ~/ to make it permanent.

DB::parse_options("dumpDepth=3");
DB::parse_options("PrintRet=0");

No more eternal scrolling sessions.

* relief *

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.