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
In reply to Re: Getting rid of "new"
by grinder
in thread Getting rid of "new"
by xdg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |