Stories
Slash Boxes
Comments
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

use Perl Log In

Log In

[ Create a new account ]

jk2addict (4946)

jk2addict
  (email not shown publicly)
http://today.icantfocus.com/blog/
AOL IM: chrislaco (Add Buddy, Send Message)
Yahoo! ID: chrislaco@sbcglobal.net (Add User, Send Message)
Jabber: laco@scribblewerks.com

Journal of jk2addict (4946)

Thursday October 05, 2006
08:55 AM

Ultra-Detailed Devel::Cover Tuts?

[ #31224 ]

I've ran across a slide show (OsCon;Geoff) or two and surfed Google, but I'm probably just looking for the wrong thing. Does anyone have any goo ultra-geeky ultra-detailed docs on what condition failures under Devel::Cover you can fix, and ones you can't fix, and how?

Sometimes, my brain just doesn't grok the truth table yet for things like variable assignment and what D::C: really wants.

For example: blib-lib-Handel-Schema-pm--condition.html

I can add defaults to the end of the assignment chain, and get from 67 to 75%. I think that's fine. I'd just like to read somewhere the in depthness of all of the condition possibilities and whether I should bother worrying about them.

I can't say that this branch coverage doesn't stump me either:
blib-lib-Handel-Schema-pm.html

The first 50 makes sense...but the second one in the middle of the same sub, when clicked, just points to the first.

Oy. I need a new hobby.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • For L12, you've got to expand out the assignment mentally into this:

    $dsn = $dsn || $$cfg{'HandelDBIDSN'} || $$cfg{'db_dsn'}

    The case you are missing is the one where all of those are false/empty. Adding a default (that is true) doesn't help you get to a case where all are false. That kind of assignment shortcut is a typical place that coverage breaks down.

    The branch stuff is confusing. Is your Devel::Cover up to date?

    • I think so. Not sure though. It may also be a case of the cover -delete not happening so I've got a mix of old and new stats. On the other side, I'm probably trying to hard to cover everything. I think I'll start off by covering each module one at a time, then start looking at stats for the entire test suite after that.