On Thu, 4 May 2006, Praveen Ray wrote:

Passing Datetime objects thru Data::Dumper::Dumper produces TONs of output - most of which is not relevant to the 'users' of the Module. Is there a way to prevent that from happening and make the output more meaningful for human consumption?

Probably not. AFAIK Data::Dupmer does not have any hooks to let the object/class being dumped tweak the output. This _is_ possible with Storable, and DateTime uses these hooks. Of course, Storable is not human-readable ;)

You might look at a Data::Dump::Streamer, which does allow you for such hooks. I'm not sure if that'd require changes to DateTime itself, or if you can provide the hooks outside of the DateTime package. Either way, it's easy enough to do locally:

  sub DateTime::data_dump_streamer_dump_hook { ... }


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/

Reply via email to