Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Accessing Subroutine Arguments

by Juerd (Abbot)
on Apr 04, 2002 at 07:14 UTC ( #156599=note: print w/replies, xml ) Need Help??


in reply to Accessing Subroutine Arguments

Or is it purely personal preference?

It is. I start using named arguments when a sub has more than two.

If does require that your sub names are logical, though.

readfile('foo.txt');
is already self-documenting, while
readfile( file => 'foo.txt' );
is redundant.

U28geW91IGNhbiBhbGwgcm90MTMgY
W5kIHBhY2soKS4gQnV0IGRvIHlvdS
ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
geW91IHNlZSBpdD8gIC0tIEp1ZXJk

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://156599]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2017-03-26 19:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (315 votes). Check out past polls.