[Catalyst] Coverage tests in Catalyst

Jonathan Rockway jon at jrock.us
Tue Dec 5 16:43:02 GMT 2006

Ian Docherty wrote:
> Is it possible to do coverage tests in a Catalyst application? If so
> how? I can't find any references that help.

Catalyst apps aren't special -- do coverage tests like you would with
any other perl module:

    $ cover -delete
    $ HARNESS_PERL_SWITCHES=-MDevel::Cover make test
    $ cover

If you want "coverage" and not test coverage (why?), then just do

    $ perl -MDevel::Cover myapp_server.pl
    <request stuff>
    $ cover

Jonathan Rockway

package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;

More information about the Catalyst mailing list