P is for Practical | |
PerlMonks |
Re: I usually debug via...by legato (Monk) |
on Mar 03, 2005 at 00:04 UTC ( [id://436041]=note: print w/replies, xml ) | Need Help?? |
While I use ptkdb for tracing, I also use the indispensible Data::Dumper::Simple0. Combining the latter with a global $_DEBUG allows me to do this: This results in:
I usually use STDOUT so I can redirect to a log file if I wish, but sometimes I call out to a logger module, too. One of the advantages of this is that I can set $_DEBUG in-code or with a command-line option &c., thereby controlling the verbosity level on a per-run basis. 0: I use this instead of Data::Dumper simply because it automagically prints the actual name of the variable instead of $VAR1 and the like. It's possible to do that with the Data::Dumper module, too, but the ::Simple version does it anyhow, so why reinvent that wheel? Anima Legato
In Section
Past Polls
|
|