in reply to Perl Object Initilization
I have to wonder why you want to make this separate from new()?
I mean, you wouldn't want an uninitialised instance of your class floating around in the wild would you?
And can you envisage a situation when you would re-initialise an existing instance rather than throw it away and create a new one?
For that makes new() and initialisation a one-to-one relationship and separating them nonsensical.
Even if the initialisation process is particularly complicated, it is far more likely that subdivisions of the initialisation--say per field initialisation and validation--will form reusable pieces of code than the initialisation process as a whole.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl Object Initilization
by armstd (Friar) on Jun 10, 2011 at 06:41 UTC | |
by BrowserUk (Patriarch) on Jun 10, 2011 at 07:09 UTC | |
by Bloodnok (Vicar) on Jun 10, 2011 at 10:32 UTC | |
by armstd (Friar) on Jun 10, 2011 at 17:36 UTC | |
by BrowserUk (Patriarch) on Jun 10, 2011 at 21:54 UTC | |
by armstd (Friar) on Jun 13, 2011 at 04:40 UTC |