"Mr. Shawn H. Corey" schreef:

> Inside a sub, shift without a parameter will shift @_.  Outside a sub,
> it will shift @ARGV.  Since it does two different things in different
> context, always give it a parameter.  Things that do different things
> should look different.

I hardly ever use "shift". I only use it if the shrinking of @_ (or
@ARGV) has added value.

So I prefer this style:

    my ($self, $key) = @_;

if I need copies. And

    alias my ($self, $key) = @_; # see Data::Alias

whenever I don't.

-- 
Affijn, Ruud

"Gewoon is een tijger."


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to