Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 avoiding work at the Monastery: (6)
As of 2016-05-27 01:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?