Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: A question about the best way to use subroutines

by Desdinova (Friar)
on Mar 27, 2001 at 03:09 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://67375]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-19 05:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found