|P is for Practical|
OO Perl: calling a constructor within a classby fx (Pilgrim)
|on Sep 26, 2001 at 13:48 UTC||Need Help??|
fx has asked for the
wisdom of the Perl Monks concerning the following question:
I've been working through Learning Perl and perldoc perltoot and I can't find an answer to my query.
I have got a simple class with a simple 'new' constructor which sets up an anonymous hash and sets up some atrributes:
However, I have another constructor in my class which works in a different way and sets some of the attributes of the object before returning it.
My question: within a class file, how should I call the basic constructor from within my more complex constructor?