"be consistent" | |
PerlMonks |
Data::Dumper too noisyby Anonymous Monk |
on Dec 02, 2008 at 17:42 UTC ( [id://727468]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: Hi Monks! I'm developing a web app, using Data::Dumper to write a kind of crash dump into the error log file. Unfortunately, the output becomes quite large, as one of the dumped variables contains lots of other objects. The internals of several of those objects (mostly not my code) are not interesting for the crash dump. Instead, I would like to see those objects stringified, while the other object (my stuff) should be dumped normally. Some of the classes are:
It seems I would need a hook into Data::Dumper that is called when Data::Dumper attempts to dump a blessed reference. It would decide if the reference is dumped as usual or if the reference is stringified. Something like
Any hints how to realize this? Thanks,
Back to
Seekers of Perl Wisdom
|
|