NAME
Devel::QuickCover - Quick & dirty code coverage for Perl
VERSION
Version 0.900014
SYNOPSIS
use Devel::QuickCover;
my $x = 1;
my $z = 1 + $x;
DESCRIPTION
The following program sets up the coverage hook on use
and dumps a report (to /tmp
by default) at the end of execution.
use Devel::QuickCover;
my $x = 1;
my $z = 1 + $x;
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()
.
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.
Use with Devel::Cover
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.
AUTHORS
Gonzalo Diethelm
gonzus AT cpan DOT org
Andreas Guðmundsson
andreasg AT nasarde DOT org
Andrei Vereha
avereha AT cpan DOT org
Mattia Barbon
THANKS
p5pclub