Long ago I put these two lines at the bottom of a script; nowadays I always throw them into my exception handling modules, but push them to main::.
sub ::D { require Data::Dumper; $Data::Dumper::Indent += 0; local $Dat +a::Dumper::Indent = 1; Data::Dumper::Dumper(@_) } sub ::DD { require Carp; Carp::confess(::D(@_)) } # Then from anywhere, use it like this: print ::D({ state => $some_obj }); [...] ::DD($obj) if $bugs_exist;
(The += 0 is just a stupid warning silencer.)
In reply to Re: I usually debug via...
by gaal
in thread I usually debug via...
by rinceWind
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |