Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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


Comment on Re: Accessing Subroutine Arguments
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2015-07-03 16:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (54 votes), past polls