Skip Menu |

This queue is for tickets about the Data-Dump CPAN distribution.

Report information
The Basics
Id: 55356
Status: resolved
Priority: 0/
Queue: Data-Dump

People
Owner: Nobody in particular
Requestors: dekimsey [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Data::Dump could use serialization hooks
As much as I love using Data::Dump, I have a problem in that many of our modules use the Inside-Out paradigm. As such, DD is unable to properly serialize the data-structures. It'd be great to have this functionality.
What interface would you propose for a serialization hook?
On Mon Mar 08 16:50:16 2010, GAAS wrote: Show quoted text
> What interface would you propose for a serialization hook?
I honestly do not know. Both Storable and Data::Dumper do their hooks slightly differently. Storable automatically looks for STORABLE_freeze and STORABLE_thaw when it is serializing a blessed data structure. Dumper has a Freezer and and Toaster variable (sets the name of the methods it should use to serialize/deserialize) which basically does something very similiar, with the usual caveat that Dumper's configuration is typically global in nature. I dunno what would be the 'best' way, but I'd probably think of looking to see if STORABLE's hooks can do the job.
On Tue Mar 09 13:31:02 2010, http://dekimsey.myopenid.com/ wrote: Show quoted text
> On Mon Mar 08 16:50:16 2010, GAAS wrote:
> > What interface would you propose for a serialization hook?
> > I honestly do not know. Both Storable and Data::Dumper do their hooks > slightly differently. > > Storable automatically looks for STORABLE_freeze and STORABLE_thaw
when it Show quoted text
> is serializing a blessed data structure. Dumper has a Freezer and and > Toaster variable (sets the name of the methods it should use to > serialize/deserialize) which basically does something very similiar,
with Show quoted text
> the usual caveat that Dumper's configuration is typically global in > nature. > > I dunno what would be the 'best' way, but I'd probably think of
looking to Show quoted text
> see if STORABLE's hooks can do the job.
With the filter feature in 1.16, I believe this already satisfies your requirement. See dumpf() and Data::Dump::Filtered. -- sh