Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: Accessing Subroutine Arguments

by kappa (Chaplain)
on Apr 04, 2002 at 12:59 UTC ( #156645=note: print w/replies, xml ) Need Help??


in reply to Re: Accessing Subroutine Arguments
in thread Accessing Subroutine Arguments

Just wondering, do you use named params when a sub takes, say, only two params?

Replies are listed 'Best First'.
Re: Re: Re: Accessing Subroutine Arguments
by perrin (Chancellor) on Apr 04, 2002 at 16:06 UTC
    If a sub takes only two params, and is not part of the public interface, it's a judgement call based on the likelihood of that sub growing in the future. If it's part of the public interface, I would used named params even if there was only a single one. It's insurance against changing a bunch of other classes later on.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://156645]
help
Chatterbox?
[msh210]: oh, good point. It's the best kind of correct
[shmem]: msh210: but I'd not call it a lie outright. That's when you do know the truth.
[msh210]: I don't have sendmail (I'm on MS Windows), so does one of you think you can report the bug?
[shmem]: msh210: 'tis about time to tell the sad truth to perl5porters - via perlbug
[msh210]: probably whoever wrote that actually knows the truth
[shmem]: msh210: you can save the perlbug text in a file and send that via your mail agent of choice
[msh210]: hm, okay, I'll try, thanks
[shmem]: ...not as an attachment, it's probably better to c&p that into the mail body

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2017-04-24 12:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (439 votes). Check out past polls.