Think about Loose Coupling | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
The most important part of this is testing. Test, test, test.
If you don't know what your code is supposed to do, if you can't verify that it does what it's supposed to do, you can't ever refactor it. That's a problem. A normal programming language gives you different ways to solve the same problem. Perl gives you more. If you've done a reasonably good job of encapsulation, you can often tweak things to improve them. You won't be free to do this until you have external verification that the code you modified has the same (good) effect that it did before. Refactoring is good. Refactoring without testing is nearly impossible. Update: Okay, okay. Confident refactoring without testing is difficult. Avoid it if you can. In reply to Re: Refactoring
by chromatic
|
|