Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 52619
Status: new
Priority: 0/
Queue: Data-Dumper

People
Owner: Nobody in particular
Requestors: NATG [...] cpan.org
Cc: natg [...] shore.net
AdminCc:

Bug Information
Severity: Wishlist
Broken in:
  • 2.121
  • 2.121_20
  • 2.122
  • 2.123
  • 2.124
  • 2.125
Fixed in: (no value)



CC: natg [...] shore.net
Subject: Toaster should not be 'called' if object can't do it
Download (untitled) / with headers
text/plain 1.1k
When Toaster is defined, Dump applies it to every frozen object. This makes the feature hard to use in cases where some classes have toaster methods and others don't. This is a common case, because it arises whenever you Dump a structure that contains objects produced by a module developed by someone else. The only workaround I know of is to add the toaster method to UNIVERSAL. This grates a little on the soul but works. If this is the way you want people to use toasters, I suggest adding a remark to the documentation, since it is a bit subtle. Otherwise, perhaps you could make the small change to the code needed to catch this case. I realize there is some subtlety in specifying the correct behavior in cases where the class also has a Freezer method. If the freezer changes the object's class, the 'right' thing to do is make sure the new class has the toaster. But there's no guarantee that the new class is even loaded at Dump-time. A reasonable compromise, I think, is to assume that if the class has a freezer, the programmer knows what s/he's doing and will ensure that the new class can do the toaster. Many thanks, Nat Goodman


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.