in reply to Writing constructors
I like to initialize a member attribute field in the blessed hash, even if it is not neccessarily defined during construction. I also like to minimize the number of input parameters in my constructors, but that really is just a personal preference.sub new { my $class = shift; bless { _att1 => $_[0], ... _attN => undef, }, $class; }
|
|---|