Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Silly code reviews and shift

by Anonymous Monk
on Feb 05, 2002 at 03:32 UTC ( [id://143344]=note: print w/replies, xml ) Need Help??


in reply to Silly code reviews and shift

I too very often use shift. I always shift of the first argument in methods. I'm sure you understand why, but I'll say why anyway. It's because I want them to be more like regular subroutine calls, where I can do nice checks on scalar(@_). And, having
sub foo { my $self = shift; ... }
certainly makes a good visual aid for me. I often even prefer to do
my $self = shift; my ($this, $that) = @_;
over     my ($self, $this, $that) = @_; -Anomo

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-26 02:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found