-----BEGIN PGP SIGNED MESSAGE-----

Moin,

as a fan of Devel::Cover I can't stress enough how usefull this module is.
Writing tests is easy, writing *good* tests is not-so-easy.

So, I tried to use Devel::Cover to coverage my testsuites. There are quite
some bugs and bumps, but these are hopefully straightened out ;)

Anyway, it is not so easy to run your entire testsuite trough Devel::Cover.
Well, sort it is:

PERL_DL_NONLAZY=1 /usr/local/bin/perl -Iblib/arch -Iblib/lib -e 'use
Test::Harness qw(&runtests $switches $verbose); $switches="-w
- -MDevel::Cover"; $verbose=0; runtests @ARGV;' t/*.t 

takes care of that. Only problem is that the cover_db is created locally to
each testfile, and that can be a problem if your testfiles chdir to
different dirs.

But I thought it would be handy and encourage the usage of Devel::Cover
when we have make target(s) like:

        perl Makefile.PL
        make cover
        make podcover

The former does anything, the latter only pod coverage. That way it would
be easier for module authors to do testsuite coverage. The make target
could also then print a summary. Currently you have then to do this
manually.

What do you think?

Cheers,

Tels

PS: The module is also great for profiling, it shows you for instance, that

        my $x; my $y;

is nearly twice as slow as:

        my ($x,$y);

which would be hard to find out with DProf (once you know, you can
benchmark it. But Devel::Cover shows this right in the source where it
happens without any special magic required). I really love it ;)

- -- 
perl -MMath::String -e 'print \
Math::String->from_number("215960156869840440586892398248"),"\n"'

 http://bloodgate.com/perl       My current Perl projects
 PGP key available on http://bloodgate.com/tels.asc or via email.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iQEVAwUBPH51mncLPEOTuEwVAQEAYAf9FV1Ju1URQb6jdPU0AdDBCxNop7wXc9zK
fQOHiPM5IvBfO92xbIlH7ZO0Gw3O0C0XChmx5B7g6ZwL4cyb0g2AxV4TTnk32e4A
ezSUKqVNY5G658EMOgLW+RHY+WWCyLfxz/TqqlUKa5CtgTAKeYlAj1ygLiJoIVEX
/PMb8V8C5UOdrQKsrfmU+2snfhUmdlI4FuGxQjfhO+eARfiNGTMb1fvzrIASeYC4
sMvZEhR3pohEVoJ3zN/fMGre/+KF717uLR9UC/6hFBEPV+cKlGGaAoyniLr7D2T+
anbNj8KrKE7y0ZS0N5vizXfMuzdGHFfK1Zt85ULlWmzV+SbTBp9IDw==
=g6l4
-----END PGP SIGNATURE-----

Reply via email to