P is for Practical | |
PerlMonks |
Re: construct a standard object oriented programby darksym (Beadle) |
on Mar 30, 2002 at 07:50 UTC ( [id://155412]=note: print w/replies, xml ) | Need Help?? |
Using sub new as a constructor isn't mandatory although it
may make sense for purposes of uniformity. sub new {} could
just as easily be sub creatething {} as described in the perl
manual pages: perlobj, perlmod, perltoot. Recommended reading.
If you want even more info, pickup a copy of the book "Programming
Perl" (the irreverent Camel Book). This is a good starting point.
Also, take a look at other's modules. Learning by example.
In Section
Seekers of Perl Wisdom
|
|