CC: | natg [...] shore.net |
Subject: | Freezer should not have to clobber object being dumped |
Freezer methods, as currently defined, operate by modifying the object
being dumped. The value returned by the freezer method is ignored.
This is okay if you don't need the object after dumping it, but is a
real pain if you plan to continue using the object.
This is related to bug 27532 (reported by me 2 years ago) and maybe 7009
reported by someone else 5 years ago.
We use DD in an object persistence module, Class::AutoDB, and have a
patch against 2.121 that fixes the problem (see previous bug report).
This was an unfortunate but acceptable workaround when DD development
was moribund, but now that active maintenance has resumed, we really
need a permanent fix. Please!!
The attached test program and output illustrate the problem. The output
is from three versions of DD - our patched version of 2.121, an
unpatched 2.121, and 2.125. The 'want' cases show how we want it to
work (and how it works in our patched version); the 'std' cases show how
it works in the standard version.
I would be happy to redo our patch for 2.125 and send it to you. (As a
heads-up, if you choose to start with our previous patch, I've come to
realize that while it works for our needs, it needs a little work to be
fully general).
Many thanks,
Nat Goodman