We don't bite newbies here... much | |
PerlMonks |
Re: OO - best way to have protected methodsby adrianh (Chancellor) |
on Aug 17, 2005 at 14:39 UTC ( [id://484448]=note: print w/replies, xml ) | Need Help?? |
See Private method variations for some more ideas. Of the two you offered I would prefer the lexically scoped coderef because you can still use the $o->$add( 42 ) calling style and not worry about subclasses accidentally breaking your code.
In Section
Seekers of Perl Wisdom
|
|