princepawn has asked for the wisdom of the Perl Monks concerning the following question:
Which of the following is a constructor in Perl: a. bless b. return c. :: d. new -- answer
But in my eyes new has NO special status to Perl under ANY circumstances and it is MERELY by convention that one returns newly blessed references to something or the other in a subroutine named new()
Am I rite or rong?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: new() is just a constructor by convention right?
by tye (Sage) on Apr 23, 2001 at 23:49 UTC | |
by merlyn (Sage) on Apr 23, 2001 at 23:55 UTC | |
by dws (Chancellor) on Apr 24, 2001 at 00:28 UTC | |
by Ovid (Cardinal) on Apr 24, 2001 at 00:05 UTC | |
|
Re: new() is just a constructor by convention right?
by dws (Chancellor) on Apr 23, 2001 at 23:37 UTC | |
|
Re: new() is just a constructor by convention right?
by Albannach (Monsignor) on Apr 23, 2001 at 23:43 UTC |