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


Version 0.900014


    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 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" });


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 and 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

and convert them into the Devel::Cover database format by running

Then you can view the reports with the standard Devel::Cover tools.


  • Gonzalo Diethelm gonzus AT cpan DOT org

  • Andreas Guðmundsson andreasg AT nasarde DOT org

  • Andrei Vereha avereha AT cpan DOT org

  • Mattia Barbon


  • p5pclub