![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Condensed output of Data::Dumper used on DateTimeby andreas1234567 (Vicar) |
on Feb 01, 2012 at 12:31 UTC ( #951201=perlquestion: print w/replies, xml ) | Need Help?? |
andreas1234567 has asked for the wisdom of the Perl Monks concerning the following question:
Honorable Monks,
I'm looking for a way to increase the readability of log files. If a reference to a DateTime object gets dumped, then the output can span multiple lines of relatively uninteresting and confusing output. Is there a way to override the 'dump' call so that what gets logged is a single line (e.g. $dt->dmy . q{ } .$dt->hms or equivalent)? This would be analogous to the TO_JSON support in JSON::XS.
-- No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]
Back to
Seekers of Perl Wisdom
|
|