in reply to Data::Dumper(::Simple) is your friend
Just lately I have come to depend on Data::Dumper a lot, particularly as I'm developing in a web environment where running a debugger is not practical.
I've come to often quickly add the following into a block of code:
I put braces around just out of habit.{ use Data::Dumper; print( Dumper( \%hashvariable ) ); }
Note that I put the backslash in front of the hash reference, for some reason that results in a clearer-to-read output from Dumper than just Dumper( %hashvariable ).
When in a web environment (such as Mason) I use the following to dump my variables:
{ use Data::Dumper; $m->out( '<pre>' . Dumper( \%hashvariable ) . '</pre>' ); }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Data::Dumper(::Simple) is your friend
by neniro (Priest) on Jul 05, 2005 at 07:56 UTC | |
by tilly (Archbishop) on Jul 05, 2005 at 22:32 UTC | |
Re^2: Data::Dumper(::Simple) is your friend
by cbrandtbuffalo (Deacon) on Jul 05, 2005 at 16:13 UTC |
In Section
Meditations