Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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
Domain Nodelet?
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 wandering the Monastery: (3)
As of 2021-10-25 02:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (89 votes). Check out past polls.

    Notices?