go ahead... be a heretic | |
PerlMonks |
Re: Lessons learned from getting to 100% with Devel::Coverby hesco (Deacon) |
on Oct 28, 2008 at 01:08 UTC ( [id://719879]=note: print w/replies, xml ) | Need Help?? |
I'm not bothered in the least by having a 'redundant' path in my code of the form:
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. 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
if( $lal && $lol ) { $life++; }
In Section
Meditations
|
|