in reply to Getting rid of "new"
You might be interested to know that merlyn posted a snippet to do this a couple of years ago at Create a constructor named the same as your package name!. I think his solution is cleaner, but there is some debate as to whether it's a good idea in the first place :)
I think a better argument to make is whether new is always the wisest name for a constructor. The canonical example is DBI, where the constructor is named connect. I think that design decision was a very good one.
• another intruder with the mooring in the heart of the Perl
|
|---|