[Melbourne-pm] Data::Dumper enhancement

Tulloh, David david.tulloh at AirservicesAustralia.com
Tue Jul 27 18:15:11 PDT 2010

For a while now I've been using Data::Dump as a replacement to
The output is better, it adapts the output style depending on the amount
of data.  For example small arrays are printed horizontally, long arrays
It also has a function dd, which displays the provided variable.
So your full example becomes: dd blah;  Thats ten less key strokes.

From: melbourne-pm-bounces+david.tulloh=airservicesaustralia.com at pm.org
[mailto:melbourne-pm-bounces+david.tulloh=airservicesaustralia.com at pm.or
g] On Behalf Of Mathew Robertson
Sent: 28 July 2010 10:39 AM
To: Melbourne Perl Mongers
Subject: [Melbourne-pm] Data::Dumper enhancement

Hi PM, 

For years I have used Data::Dumper to help me debug my code, usually
with the syntax:

  print Dumper(blah);

It occurred to me that I could save some keystrokes... so went looking
at Dumper.pm and found that 'wantarray' is being used to determine the
calling context for list vs. scalar. But it isn't being used to detect
void context...

Would saving 6 keystrokes would be a useful enhancement?

Mathew Robertson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/melbourne-pm/attachments/20100728/3511deaa/attachment.html>

More information about the Melbourne-pm mailing list