in reply to (tye)Re: new() is just a constructor by convention right?
in thread new() is just a constructor by convention right?
The difference is in whether or not you need to know the class name. Factory methods "hide" that need, which is a Very Good Thing when you're building class hierarchies that other might extend.
DBI's prepare is a factory method, not a constructor.
|
|---|