Devel::QuickCover - Quick & dirty code coverage for Perl
Version 0.900000
use Devel::QuickCover; my $x = 1; my $z = 1 + $x;
The following program sets up the coverage hook on use and dumps a report (to /tmp by default) at the end of execution.
use
/tmp
The following program sets up the coverage hook on start() and dumps a report to some_dir on end(), at which point the coverage hook gets uninstalled. So in this case, we only get coverage information for bar(). We also get the specified metadata in the coverage information. We also ask not to register an atexit() handler to dump cover data / cleanup; it will be done from end().
start()
some_dir
end()
bar()
use Devel::QuickCover ( nostart => 1, nodump => 1, noatexit => 1, output_directory => "some_dir/", metadata => { git_tag = "deadbeef" }); foo(); Devel::QuickCover::start(); bar(); Devel::QuickCover::end(); baz();
For now, we support calling start() only once.
When you call end(), you can optionally pass a nodump boolean argument, to indicate whether you wish to skip generating the cover files.
nodump
Devel::QuickCover is distributed with the scripts qc-aggregate.pl and qc-html.pl that can be used to convert its output into a format that Devel::Cover understands. Once you have generated your coverage reports, aggregate them by running
qc-aggregate.pl
and convert them into the Devel::Cover database format by running
qc-html.pl
Then you can view the reports with the standard Devel::Cover tools.
Gonzalo Diethelm gonzus AT cpan DOT org
gonzus AT cpan DOT org
Andreas Guðmundsson andreasg AT nasarde DOT org
andreasg AT nasarde DOT org
Andrei Vereha avereha AT cpan DOT org
avereha AT cpan DOT org
Mattia Barbon
p5pclub
To install Devel::QuickCover, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::QuickCover
CPAN shell
perl -MCPAN -e shell install Devel::QuickCover
For more information on module installation, please visit the detailed CPAN module installation guide.