Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: High level OOP query

by pajout (Curate)
on Oct 24, 2013 at 13:50 UTC ( [id://1059463] : note . print w/replies, xml ) Need Help??


in reply to High level OOP query

Hello packetstormer,
for better general understanding, I recommend Advanced Perl Programming by Sriram Srinivasan, that book helped me very much.

Specially about your question: There are many ways how to initiate instances of classes, for instance:

  • blank instance, initialized just by calling setter methods
  • with hardcoded default values
  • with values specified by argument of new method
  • combination of previous 2 concepts
  • new method calls init method
  • etc., typically with usage of inheritance
I think the point is to design it in way, which satisfies your exact requirements.