Think about Loose Coupling | |
PerlMonks |
Re^3: Subroutines versus straight top to bottom scriptsby chime (Friar) |
on Jun 03, 2005 at 14:46 UTC ( [id://463289]=note: print w/replies, xml ) | Need Help?? |
I have constructed my programs so that they consist of a main() sub which made up of a list of smaller subroutines.
Each line of the main() is commented. The effect is similar to a novel with the main equivalent to a list of chapters with the sub routines making up like the contents of a book.
Also when I need to check any part of the program I can see in the main where about it is
Making changes updating or removing is made alot easier especially when there are no inner subroutines.
Of course not all the sub routines are listed in main() as some are within called with others
In Section
Seekers of Perl Wisdom
|
|