Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Shift versus Sanity

by VSarkiss (Monsignor)
on Apr 24, 2002 at 00:00 UTC ( #161485=note: print w/replies, xml ) Need Help??


in reply to Shift versus Sanity

I almost always prefer the my ($self) = @_; style in general, but there are circumstances where you really want to use shift, such as when you're going to pass your own arguments down to another routine:

my ($self) = shift; helper_sub(@_);
It's really a question of judicious choices: function first, performance second. Cargo-cult programming third ;-)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2020-12-03 08:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (53 votes). Check out past polls.

    Notices?