in reply to Dumping variables but DRY and simple

For a fairly terse output, I usually set:

local $Data::Dumper::Indent=0; local $Data::Dumper::Varname=''; local $Data::Dumper::Terse=1; local $Data::Dumper::Pair='=>'; local $Data::Dumper::Sortkeys=1; local $Data::Dumper::Quotekeys=0;

-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re^2: Dumping variables but DRY and simple
by LanX (Saint) on Mar 27, 2010 at 14:55 UTC
    OK thanks it doesn't display $VAR1 anymore ...

    ...but one still doesn't get the realname displayed and you still have to reference the dumped structures.

    or do I miss it?

    Cheers Rolf

      To get to the real name, you would have to fiddle with the compiler. Data::Dumper doesn't do this.

      -- 
      Ronald Fischer <ynnor@mm.st>
        > To get to the real name, you would have to fiddle with the compiler.

        Sorry IMHO that's wrong, I can get the realname for my and our declarations with the help of PadWalker which is core!

        And even without strictures I can still search through the symbol tabel of the caller's package.

        (which might produce multiple results)

        Cheers Rolf

        For completeness, there is still the possibility to fiddle with the sourcecode.

        caller returns linenumber and filename of the caller.

        Anyway I'm not sure if there are sideeffects when trying to access the file...

        Cheers Rolf