http://www.perlmonks.org?node_id=219503


in reply to (my?) problem with re-blessed references(?)

I wonder if you'd be better off initializing attributes in the constructor like this instead:
if (ref $args eq "HASH") { while(my ($method, $value) = each %$args) { if (my $func = $self->can($method)) { $func->($self, $value); # Update: I think in this case (after # consulting in CB and in the docs # regarding lvalue subs) it should be: # $func->($self) = $value } } }
It seems much more maintainable and inheritable this way. I also wonder about the need for a "new" method (i.e. constructor) in the QuotePlus class. It seems like it should just be inherited from the Quote class.