Posted on 2009-02-17 00:47:31-08 by csjewell
Compatibility with Data::Dump::Streamer
Trying to dump an object (a normal hash-based one - it has to be backwards compatible at the moment) that contains objects created with Object::InsideOut with Data::Dump::Streamer gives me code like this:

(there are about 90 fragments in the real code, and it dumps out to 900 lines... This is only a portion)

... fragments => { Archive_Tar => bless( \5849, 'Perl::Dist::WiX::Files' ), Archive_Zip => bless( \5831, 'Perl::Dist::WiX::Files' ), ... CreateCpan => bless( \125, 'Perl::Dist::WiX::CreateFolder' ), Digest_MD5 => bless( \5876, 'Perl::Dist::WiX::Files' ), ... dmake => bless( \130, 'Perl::Dist::WiX::Files' ), Environment => bless( \123, 'Perl::Dist::WiX::Environment' ), ... Icons => bless( \122, 'Perl::Dist::WiX::StartMenu' ), ... YAML => bless( \5687, 'Perl::Dist::WiX::Files' ) }, icons => bless( \126, 'Perl::Dist::WiX::Icons' ), ...

This is expected, afaict, and I can deal with it, at least for the moment. However, DDS allows for hook routines that can be called (see the documentation on search.cpan.org) to give a representation that can create the object again.

Could you write (or at least suggest how to go about it in the docs) writing a DDS_freeze routine and thawing routine? Please? (Or if the routines provided for Storable use or the dump/pump() routines will work [or mostly work] for the purpose, hooking them to the right places?) I think I'd even attempt to use a round tuit for the purpose, but I'm afraid I'd be more of a hindrance than a help.

Thank you.
Direct Responses: 9989 | Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.