in reply to What is the use de-referencing and creating a new anonymous hash in new() and rnew() ?

This is a poor way of going about things. As noted, a subclass can have its own Defaults. The problem is that a subclass does not default to having the same defaults as its superclass. This would be better:
{ my %Defaults = ...; sub Defaults { \%Defaults } } sub new { my $class = shift; my $self = bless { %{ $class->Defaults } }, $class;
  • Comment on Re: What is the use de-referencing and creating a new anonymous hash in new() and rnew() ?
  • Download Code