Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Brief OO question

by armstd (Friar)
on Oct 05, 2011 at 02:51 UTC ( #929703=note: print w/ replies, xml ) Need Help??


in reply to Brief OO question

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


Comment on Re: Brief OO question

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://929703]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2015-07-04 02:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls