http://qs321.pair.com?node_id=11118579


in reply to Working with old code

I don't get what people dislike about a 100+ line method/function/subroutine if it has no reason to be split and it the chuncks in the sub have been well separated and commented. There are ereasons enough to keep something that is only ever run as one process to keep together. If none of the parts is reused or used by others there is no reason whatsoever to break it apart, which only *complicates* readability.

Most people that I met that want to break up long sub's seem to come fro a java-enviroment where people are tought that long subs are bad and that even quality checks mark these methods as "bad" as they are too long or too complicated. BULLOCKS!

I 100% agree with the other comments. Start with tests and documentation.

If a found bug needs a fic that would warrant a break-up, only then consider to break up in smaller pieces. Really smaller subs are by no means always better to maintain.


Enjoy, Have FUN! H.Merijn