Devel::Cover::Report::Compilation − backend for Devel::Cover
version 1.51
cover −report compilation
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.
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
To use with Emacs compilation mode:
M−x
compile
cover −report compilation
Then use C−x ` (next−error) to jump to each uncovered location.
To use with vim quickfix:
:cgetexpr
system('cover −report compilation')
:copen
Then use :cn and :cp to navigate between uncovered locations.
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
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:"
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.
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.
Prints uncovered subroutine coverage information for the specified file. Reports subroutines that were never called during testing.
Prints uncovered POD (Plain Old Documentation) coverage information for the specified file. Reports sections of POD documentation that do not have corresponding tested code.
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.
Devel::Cover
Huh?
Copyright 2001−2025, Paul Johnson ([email protected])
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