|
|
| Think about Loose Coupling | |
| PerlMonks |
Re: Brief OO questionby armstd (Friar) |
| on Oct 05, 2011 at 02:51 UTC ( #929703=note: print w/ replies, xml ) | Need Help?? |
|
Not in my opinion, but I rarely do it. My main considerations for doing so are maintainability and performance. If it's a trivial method called often, I'll definitely consider using $_[0] instead of assigning $self first, like your example. If it's a method that does considerable or complicated things to "$self", or isn't called very often, then I consider $self more maintainable and will prefer it. --Dave
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||