This is why modules and subs arent talked about muchModules and subs are talked about all the time by perl programmers who have half a clue about what they're doing.
If you push a block of code off into a sub inside a module, among other things you'll discover that it's much easier to write tests for it, and once you've got tests for it, it's much easier to re-write it as you describe (though reducing line count is hardly ever the first priority).
In reply to Re^2: Philosophical question about testing
by doom
in thread Philosophical question about testing
by rastoboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |