Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Are there any good Code coverage tools (Freeware) for PERL. Also with good documenatation. Regards

Replies are listed 'Best First'.
Re: Code coverage
by holli (Abbot) on May 24, 2005 at 12:11 UTC
      Hi Thanks But I thought that was a alpha version

        CPAN version numbers less that 0 don't always necessarily mean "alpha". For instance POE is still at 0.31 but many people have been using it in production code for years. If you look at the CPAN Testers report for the module in question you'll see it's been checked out on a large number of platforms with only a few hiccups.

        Update: As adrianh mentions the docs are a good place to look for alpha-ness, and also check the "DSLIP" notation from the module list (which coincidentally does say that Devel::Coverage is considered alpha by the author :).

        Hi Thanks But I thought that was a alpha version

        While the author is still classifying it as an alpha release it's very stable and works well. There are a few odd corners where it doesn't give accurate results but it's the best Perl coverage tool by a long way.

        I use it all the time for production work.

        cpan modules that contain an underscore in the version number (e.g. 0.53_1) are officially developer (or alpha) releases, and are marked as such on http://search.cpan.org

Re: Code coverage
by cees (Curate) on May 24, 2005 at 13:19 UTC

    Module::Build has support for testing code coverage.

    testcover: Runs the "test" action using "Devel::Cover", generating a code-coverage report showing which parts of the code were actually exercised during the tests.

    And it is as simple to use as this:

    perl Build.PL ./Build testcover

    - Cees