Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Condensed output of Data::Dumper used on DateTime

by educated_foo (Vicar)
on Feb 01, 2012 at 16:17 UTC ( [id://951260]=note: print w/replies, xml ) Need Help??


in reply to Condensed output of Data::Dumper used on DateTime

Yes. Set $Data::Dumper::Freezer to the name of the method you want called, then implement that method in DateTime, e.g.
$Data::Dumper::Freezer = 'my_dumper'; sub DateTime::my_dumper { ... }
Even better, you can localize the change to $Data::Dumper::Freezer so pretty-printing only happens when you want it to.

EDIT: Corrected to DateTime::my_dumper...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-04-19 20:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found