in reply to Re^2: calling a method within a constructor
in thread calling a method within a constructor

It's a peculiarity only if you want Perl to behave as other OO languages.

OOP, if you listen to the purists, is about taking some data and some behavior and associating the two of them such that you can call behaviors on the data. That most OO language designers think programmers are too stupid to be entrusted with the mechanics of this isn't Perl's problem.

As for constructors, there's nothing magical about new() at all. DBI uses connect() as the constructor - there is no new().


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re^3: calling a method within a constructor