Devel::Cover::Report::Compilation(3)

NAME
Devel::Cover::Report::Compilation - backend for Devel::Cover

VERSION
version 1.52

SYNOPSIS
 cover -report compilation

DESCRIPTION
This module provides a textual reporting mechanism for coverage data. It is designed to be called from the "cover" program.

It produces one report per line, in a format like Perl's own compilation error messages. This makes it easy to use with development tools that understand compilation output formats, such as Emacs compilation mode, vim quickfix, or IDE error navigation features.

OUTPUT FORMAT
The compilation report generates output in the following formats:

•   Statements

      Uncovered statement at filename.pm line 42:

•   Branches

      Branch never true at filename.pm line 15: condition
      Branch never false at filename.pm line 20: unless condition
      Branch never reached at filename.pm line 25: condition

•   Conditions

      Uncovered condition (left, right) at filename.pm line 30: expr && expr

•   Subroutines

      Uncovered subroutine function_name at filename.pm line 50

•   POD Documentation

      Uncovered pod at filename.pm line 60

USAGE WITH DEVELOPMENT TOOLS

  Emacs Compilation Mode
To use with Emacs compilation mode:

  M-x compile
  cover -report compilation

Then use C-x ` (next-error) to jump to each uncovered location.

  Vim Quickfix
To use with vim quickfix:

  :cgetexpr system('cover -report compilation')
  :copen

Then use :cn and :cp to navigate between uncovered locations.

COVERAGE TYPES
The compilation report supports all standard Devel::Cover coverage types:

•   statement - Individual Perl statements

•   branch - Conditional branch execution paths

•   condition - Boolean condition combinations

•   subroutine - Subroutine call coverage

•   pod - POD documentation coverage

Use the standard "cover" command options to select which types to report:

  cover -report compilation +statement +branch +condition +subroutine +pod

FUNCTIONS

  print_statement($db, $file, $options)
Prints uncovered statement coverage information for the specified file. Outputs one line per uncovered statement in the format:

  "Uncovered statement at $file line $line_number:"

  print_branches($db, $file, $options)
Prints uncovered branch coverage information for the specified file. Reports branches where one or both execution paths were not taken. Outputs detailed information about which branch condition was never true, false, or reached.

  print_conditions($db, $file, $options)
Prints uncovered condition coverage information for the specified file. Reports logical conditions that were not fully exercised, showing which parts of complex boolean expressions were not tested.

  print_subroutines($db, $file, $options)
Prints uncovered subroutine coverage information for the specified file. Reports subroutines that were never called during testing.

  print_pod($db, $file, $options)
Prints uncovered POD (Plain Old Documentation) coverage information for the specified file. Reports sections of POD documentation that do not have corresponding tested code.

  report($pkg, $db, $options)
Main entry point for generating compilation-style coverage reports. Iterates through all files and calls the appropriate print functions based on the coverage types requested in the options.

SEE ALSO
 Devel::Cover

LICENCE
Copyright 2001-2026, Paul Johnson (paul@pjcj.net)

This software is free. It is licensed under the same terms as Perl itself.

The latest version of this software should be available from my homepage: https://pjcj.net