With that in mind, could this be what is causing my problems?
I skimmed that part the first time, but you're right. It's definitely causing you problems. Here's a hint; this is a closure:
*$datum = sub { shift; # XXX: ignore calling class/object $self->{$datum} = shift if @_; return $self->{$datum}; };
In other words, every time you create a new object, you create a new closure bound to that new $self. Every time you call an accessor or mutator on an existing object, that accessor or mutator uses the values of the most recently created object.
The immediate fix is to look at the XXX comment and make that generated method not close over $self. A better fix overall is not to generate (and clobber previously generated!) accessor and mutator methods in your constructor.
Improve your skills with Modern Perl: the free book.
In reply to Re^3: Problem with Inheriting a Super Class
by chromatic
in thread Problem with Inheriting a Super Class
by PyrexKidd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |