Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: To sub or not to sub, that is the question?

by mrmick (Curate)
on Jun 25, 2001 at 17:21 UTC ( #91263=note: print w/ replies, xml ) Need Help??


in reply to To sub or not to sub, that is the question?

I always try to use the following:

  • If there is a single distinct operation being done, make it a sub.
  • If something is being repeated, make it a sub.
  • If making a decision within the program, make it a sub.
In other words, if in doubt, make it a sub. It will make your code easier to maintain.

Mick


Comment on Re: To sub or not to sub, that is the question?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2014-10-20 04:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (72 votes), past polls