Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: When Is Dividing Code Into Different Subroutines/Packages Important?

by Anonymous Monk
on Jun 14, 2003 at 17:30 UTC ( [id://265925]=note: print w/replies, xml ) Need Help??


in reply to Re: When Is Dividing Code Into Different Subroutines/Packages Important?
in thread When Is Dividing Code Into Different Subroutines/Packages Important?

There is allways a need of testing some part of your code.

So, you can group some parts to test alone. This is also a reason for having some code separated.

If you think some code is not going to stay like it is for a long time, by having it at a subrutine, you ensure that everything that is related to it goes modified even if you forget what was all about.

The correct way of structuring some code, IMHO, is by starting keeping as much as you can together.

Then with the use, you are going to notice the risk of keeping all in this way, and you are going to happily start cutting some code and making some standarization for future improvement.

  • Comment on Re: Re: When Is Dividing Code Into Different Subroutines/Packages Important?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2024-04-19 15:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found