Hi,

First thanks for your talk on YAPC 2003 at Paris on this subject.
The first thing i've do when I was come back was to test your module.

Here feedback.

In the README:

Requirements:
- Perl 5.6.1 or 5.7.1.
 * May be 5.8.0|1 ? ;-)
 * Or 5.6.1 or greater ?

- The -delete flag of cover isn't documented

I want use this module to see the cover of my cpan module, and think a lot of people using your module want do same thing.
But if I ran test scripts, I've only cover for the test script, not the module.


I found this, after a lot of try and with the help of cpancover. May be this can be added to the doc:

--
For test the cover of a CPAN module, cd in the directory with your Makefile.PL is, and then do:


$ for i in $(ls t/*.t); do \
  perl -I$PWD/blib/lib -I$PWD/blib/arch \
       -MDevel::Cover=-ignore,t/,-select,blib/lib $i;
done;

or the easy way, use the HARNESS_PERL_SWITCHES: (with bash)
$ export HARNESS_PERL_SWITCHES=\
     "-MDevel::Cover=-ignore,t/,-select,blib/lib"
$ make test.

But with this method, i've two cover_db created:
ls -l cover_db/ t/cover_db/
cover_db/:
total 40
-rw-r--r--    1 alian    users       39217 jui 27 18:48 cover.4

t/cover_db/:
total 96
-rw-r--r--    1 alian    users       91374 jui 27 18:49 cover.4

The first one is in fact empty. So I need to cd to t, and then cover -report html.
But I receive this:
$ cover -report html
Reading database from cover_db
------------------------------------------ ------ ------ ------ ------
File stmt branch cond time total
------------------------------------------ ------ ------ ------ ------
blib/lib/Test/Smoke/Database.pm 31.06 29.62 31.44 100.00 30.64
blib/lib/Test/Smoke/Database/Graph.pm 0.00 0.00 0.00 n/a 0.00
Total 22.93 24.13 26.29 100.00 23.78
------------------------------------------ ------ ------ ------ ------


HTML output sent to /home/alian/project/CPAN/Test/Smoke/Database/t/cover_db/cover_db.html
Unable to open blib/lib/Test/Smoke/Database.pm: Aucun fichier ou répertoire de ce type
Exiting subroutine via next at /usr/local/perl-5.8.0/lib/site_perl/5.8.0/i686-linux-thread-multi-64all-ld/Devel/Cover/Report/Html.pm line 95.
Unable to open blib/lib/Test/Smoke/Database/Graph.pm: Aucun fichier ou répertoire de ce type
Exiting subroutine via next at /usr/local/perl-5.8.0/lib/site_perl/5.8.0/i686-linux-thread-multi-64all-ld/Devel/Cover/Report/Html.pm line 95.


Yes, normal, the blib is one level up in the directory. So I delete the empty one, mv the t/cover_db directory to his parent, and cover become happy.

Thanks for your module. May be more feedback later.

--
Alain BARBET



Reply via email to