in reply to Lessons learned from getting to 100% with Devel::Cover
Somewhere among all those Best Practices articles I've read, I picked up the habit of never writing a conditional without an else clause. I can elsif my way through lots of potential logical branches, but if I fail to code some exception throwing into a final else branch of the dispatch code, I will never know if I truly covered all the bases.if(1) { $obj->method(); } else { print STDERR "False is true, War is peace and slavery is freedom. W +e should never have reached this condition.\n"; die; }
I tried this '100%' exercise with a module last year, and got coverage of over 90%, most of the uncovered execution paths were along the lines of the example above.
-- Hugh
|
|---|