note
Trimbach
<blockquote><i>I'll cut off the people who will tell you, don't use new, since if you have a function called new in your main:: space, it'll break your program.</i></blockquote>
<p>Uh, no. Although there is no rule that OO constructors be called "new" it's a pretty standard convention. Some modules (notably DBI) use an alternative constructor name, but it certainly does NOT break anything if you have a subroutine named "new" in package main.
<blockquote><i>Why would you have a funciton called new? New what? New time of day? New cheese?</i></blockquote>
It's a constructor. It makes a new object. That's why it's called new.
<p>As for the original question, I'm rather fond of Class::MethodMaker. Works for me, though YMMV.
<div class="pmsig">
<div class="pmsig-35324">
<p><a href="mailto:gblackburn@mac.com">Gary Blackburn</a><br>
Trained Killer
</div></div>
329819
329826