[Edinburgh-pm] Parameter passing, seeking an answer....

Kevin White kevin at theconfused.co.uk
Thu Sep 6 01:34:45 PDT 2007


Hi Ian,

I don't know about compelling reason, I have a tendency to use the  
former just because it is clear what I am taking off. The only time I  
tend to use @_ is if I am using Params::Validate.

Kevin

On 6 Sep 2007, at 08:49, Ian Stuart wrote:

> When I first started coding, I'd pick up parameters in functions thus:
>
> sub myFunc {
>   my self = shift;
>   # stuff
> }
>
> I've noticed that people have moved to a new style:
>
> sub myFunc {
>    my ($self) = @_;
>    # stuff
> }
>
> Is there a good compelling reason for this (new to me) style?
>
> -- 
>
> Ian "Perl Laghu" Stuart.
>
> _______________________________________________
> Edinburgh-pm mailing list
> Edinburgh-pm at pm.org
> http://mail.pm.org/mailman/listinfo/edinburgh-pm

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/edinburgh-pm/attachments/20070906/43b418f4/attachment.html 


More information about the Edinburgh-pm mailing list