[Melbourne-pm] Data::Dumper enhancement

Alfie John alfiejohn at gmail.com
Tue Jul 27 18:24:53 PDT 2010


Hey Mathew,

I think if you want to change the behaviour of something that most people
aren't going to agree but it still bugs you, maybe consider adding an
expansion key binding to your editor e.g. iab in VIM.

Alfie

On Wed, Jul 28, 2010 at 11:15 AM, Tulloh, David <
david.tulloh at airservicesaustralia.com> wrote:

>  For a while now I've been using Data::Dump as a replacement to
> Data::Dumper.
>
> The output is better, it adapts the output style depending on the amount of
> data.  For example small arrays are printed horizontally, long arrays
> vertically.
>
> It also has a function dd, which displays the provided variable.
> So your full example becomes: dd blah;  Thats ten less key strokes.
>
>
> David
> ------------------------------
> *From:* melbourne-pm-bounces+david.tulloh=airservicesaustralia.com at pm.org[mailto:
> melbourne-pm-bounces+david.tulloh <melbourne-pm-bounces%2Bdavid.tulloh>=
> airservicesaustralia.com at pm.org] *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?
>
> cheers,
> Mathew Robertson
>
> _______________________________________________
> Melbourne-pm mailing list
> Melbourne-pm at pm.org
> http://mail.pm.org/mailman/listinfo/melbourne-pm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/melbourne-pm/attachments/20100728/5a0b20f2/attachment.html>


More information about the Melbourne-pm mailing list