NAME

Devel::QuickCover - Quick & dirty code coverage for Perl

VERSION

Version 0.200000

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.

use Devel::QuickCover (nostart => 1, nodump => 1, output_directory => "some_dir/");
foo();
Devel::QuickCover::start();
bar();
Devel::QuickCover::add_metadata({ foo => "FOO", bar => "BAR" });
Devel::QuickCover::end();
baz();

For now, we support calling start() only once.

AUTHORS

  • Gonzalo Diethelm gonzus AT cpan DOT org

  • Andreas Guðmundsson andreasg AT nasarde DOT org

  • Andrei Vereha avereha AT cpan DOT org

THANKS

  • Mattia Barbon

  • p5pclub