Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^3: Perl Object Initilizationby PyrexKidd (Monk) |
on Jun 11, 2011 at 23:32 UTC ( [id://909274]=note: print w/replies, xml ) | Need Help?? |
This is a simplified version. In this particular case, you are saying that it is better to pass a hash (or hash ref) and build any attributes/values (using a loop) because if you have an uneven list it will cause a mismatch of keys/values? on the note of 'initialize as needed', would you define the respective initialization subroutines in the class definition, then call them from the code where you require the object?
In Section
Seekers of Perl Wisdom
|
|