Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • With tests, it feels like there's two kinds of duplication: repeated test setup or utility code that's more involved with the mechanics of testing, and repeated code that involves the things under test. I usually factor the former into something like Test::Utility. The latter is more problematic. Some of it may be fair game to be moved off into a MyStuff::TestUtilities. The criteria for me, though, is wether the refactoring will reduce the readability of the tests.

    Tests are a form of documentation. As documentation, I'll allow more redundancy. I hate encountering code that's been refactored to the point of unreadability, only to discover that the tests, which I'd hope would shed light on what's going on, have also been brutally refactored to the point of unreadability.