CC: | Chris Cavnor <ccavnor [...] systemsbiology.org> |
Subject: | Want freezer methods for some classes but not others |
Date: | Mon, 11 Jun 2007 07:43:38 -0700 |
To: | bug-Data-Dumper [...] rt.cpan.org |
From: | "Nathan (Nat) Goodman" <natg [...] shore.net> |
If a freezer method is defined for a given Dumper, the code assumes all
classes can execute a method by that name. In my application, I want to
dump some objects in a special way, while letting Dumper do its usual
thing on other objects.
A simple example shows the current behavior:
----------
use Data::Dumper;
$x=bless {a=>1},'AnyClass';
$Data::Dumper::Freezer='any_method';
print Dumper($x); # fails. would prefer that Dumper ignore custom
freezer if not defined
----------
Working patch files are available at
http://isbiology.cvs.sourceforge.net/isbiology/AutoTools/AutoDB/patches/
We first reported this problem in Sep 2004. It looks to be related to
bug 7009 reported by someone else.
Any chance you can/will fix this? I'm in the process of cleaning up the
package I distribute that needs the patch. If you aren't going to fix
it, I'll bite the bullet and include the patched version (renamed) in
the package I distribute. No big deal, but I hate to branch someone
else's code unnecessarily.
Thanks a lot for all you do! I really appreciate your hard work in
making Perl such an immense force!!
Best,
Nat Goodman
Senior Research Scientist
Institute for Systems Biology