Don't ask to ask, just ask | |
PerlMonks |
Re^3: OO - best way to have protected methodsby astroboy (Chaplain) |
on Aug 18, 2005 at 09:11 UTC ( [id://484708]=note: print w/replies, xml ) | Need Help?? |
Well, you'd best benchmark it. If you're calling methods in a tight loop it might be a problem, but if you look at the code - say of Attribute::Protected - you're simply calling one other explict method and one anonymous sub for an attribute that you assign to your methods. That slight penalty is offset by the readability conferred IMHO
In Section
Seekers of Perl Wisdom
|
|