http://www.perlmonks.org?node_id=645276


in reply to Re: Macro in perl code?
in thread Macro in perl code?

Actually, for some time I have used the following convention in object-oriented modules:

sub func { my $self = shift; my ($param1, $param2, ..., $paramn) = @_; # ... }

Motivation: you "slurp" the calling object, after which it is clearer which are actually parameters to the method.

(Sorry for OT.)

Update: changed "my func" to "sub func". Silly me.

--
print "Just Another Perl Adept\n";