Beefy Boxes and Bandwidth Generously Provided by pair Networks httptech
Syntactic Confectionery Delight
 
PerlMonks  

Re: A question about the best way to use subroutines

by Desdinova (Friar)
on Mar 27, 2001 at 03:09 UTC ( #67375=note: print w/ replies, xml ) Need Help??


in reply to A question about the best way to use subroutines

The advice given to me by an 'old' programmer to try to keep each 'function' under 50 lines so it fit on one screen. If it goes over that you can most likely split it in two items. If the main part of the script was over that then you most likely had to many subs. This of course is meant as a rough guideline. For me looking at code this way has made it very easy to break apart a program into neat parts that are often reusable with only minor tweaking. Also the whole idea of seeing the function without scrolling has made maintance easier.


Comment on Re: A question about the best way to use subroutines

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2014-04-25 08:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (585 votes), past polls