NAME

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

VERSION

Version 0.600000

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.

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