Paul Johnson wrote:

 HARNESS_PERL_SWITCHES=-MDevel::Cover=-select,. make test

The downside is that that will also give you coverage for every module
you use, which is distracting and slow.

Well this may be worthy of note, it still doesnt report coverage of a
sub I know is being exercised.

Now I tried to reproduce by cutting down the code to just the module,
with the 'uncovered sub' only and the t-file, but it suddenly reported
100% coverage, so that wasn't going to work without a lot of
cutting-testing-pasting'.

Next I tried to see why D::C 0.50 didn't work. To do this I started with
a clean slate, ala 'echo y | cvs release -d monash.its && cvs co
monash.its' (blow away the source dir structure and recreate from CVS).
I then did the 'perl Ma...&& make test' incantation, all OK.

Then I did 'HARNESS_PERL_SWITCHES=-MDevel::Cover make test' and viola it
worked
File                                  stmt branch   cond    sub   time
total
----------------------------------- ------ ------ ------ ------ ------
------
blib/lib/Monash/LDAP.pm               98.7   98.4   80.0   96.3   67.2
97.3

(Dont worry about the 96.3% subroutine coverage - there is one sub not
unit tested on explicit direction from the infrastructure team - so I
have the required 100%)

So, I guess there was possibly some cruft around, either from the blib
created by MakeMaker, or something in the cover_db dir (I tend to
accumulate 'cover' runs over a long period (in this case weeks)). We'll
never know now.

Morale - clean up and try from scratch before hitting the 'emergency
email support' button.

Thanx so much for your patience Paul - if your ever in Melbourne, I owe
you a few shouts at the bar - I recommend a James Boags.

Leif Eriksen
aka Mr Testing SmartyPants (you can tell I'm please with myself cant you)



Reply via email to