in reply to construct a standard object oriented program

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.
  • Comment on Re: construct a standard object oriented program