Skip Menu |

This queue is for tickets about the Net-Amazon CPAN distribution.

Report information
The Basics
Id: 5475
Status: resolved
Priority: 0/
Queue: Net-Amazon

People
Owner: Nobody in particular
Requestors: tony [...] tmtm.com
Cc:
AdminCc:

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



Subject: Accessors added in new!?
Currently you're adding accessors to the objects when they're instantiated rather than to the class as a whole. So, for example, if I thaw a Net::Amazon::Property::DVD and put it in a database, then later, when I pull it back from the database, it no longer has a title() method until I call new() on another property! This is rather bizarre behaviour, and could probably be avoided by moving all the make_accessor calls in your new() functions out to package level: __PACKAGE__->make_accessor('title'). (I also can't see why you're always calling SUPER::make_accessor when there's no make_accessor method in the current package...)
[guest - Fri Feb 27 16:43:28 2004]: Show quoted text
> Currently you're adding accessors to the objects when they're > instantiated rather than to the class as a whole.
Sorry for the long wait, but it's finally fixed now in 0.25. Accessors are now called at the package level, no longer in the constructor, exactly as you've suggested. Thanks! -- Mike