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

Re^2: Strictly nested sub warnings

by raybies (Chaplain)
on Oct 06, 2010 at 11:57 UTC ( #863764=note: print w/ replies, xml ) Need Help??


in reply to Re: Strictly nested sub warnings
in thread Strictly nested sub warnings

It's probably a stupid question, but why not use prototypes?

I like that I get some argument checking (not a whole lot, but that's actually better most of the time) by declaring named subs (i.e.  sub mySubroutine ($$) has two expected scalar args) with args, but I also like to stuff my subs at the bottom of my file, and so perl issues a warning if I don't put the prototype at the beginning of the code.

Are you suggesting that to become more Perly, one must abandon naming arguments altogether in subs?

Thanks again, all, for the suggestions. --Ray


Comment on Re^2: Strictly nested sub warnings
Download Code
Re^3: Strictly nested sub warnings
by eyepopslikeamosquito (Canon) on Oct 06, 2010 at 12:09 UTC
      Thanks! I was just reading that exact node in the Meditations section... --Ray

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-09-23 01:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (210 votes), past polls