Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Dumping variables but DRY and simple

by rovf (Priest)
on Mar 27, 2010 at 14:35 UTC ( [id://831346]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://831346]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (7)
As of 2024-04-18 13:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found