COVER(1p)
π COVER(1p) β the cover girlies' manual π
okay so bestie, welcome to the manual page for cover from the User Contributed Perl Documentation crowd. she reports coverage statistics and she ate, no cap. currently living her best life at version 1.52. β¨
πΈ NAME πΈ
cover β report coverage statistics. that's it, that's the vibe check. π
π VERSION π
version 1.52 β yes queen, that's the current one. π
β¨ SYNOPSIS β¨
cover -test
cover -report html_basic
literally two whole commands and you're off. iconic.
π¦ DESCRIPTION π¦
she reports coverage statistics in a variety of formats. versatility? we love to see it. π
the summary option gives you a short textual summary β quick, cute, to the point. want more? the other reports are available by using the report option. yes bestie, there's a whole menu.
the following reports are currently available:
htmlβ detailed HTML reports (default)html_basicβ detailed HTML reports with syntax highlightingtextβ detailed textual summarycompilationβ output in a format similar to Perl errorsjsonβ output in a JSON formatvimβ show coverage information in vim gutter
π OPTIONS π
the following command line options are supported, and yes i'm listing every single one because we don't gatekeep:
-h,-helpβ show help π-i,-infoβ show documentation π-v,-versionβ show version π’-silentβ don't print informational messages (defaultoff) π€«-summaryβ give summary report (defaulton) π-reportreport_format β report format (defaulthtml) π¨-outputdirdir β directory for output (default given db) π-launchβ launch report in viewer (if avail) (defaultoff) π-selectfilename β only report on the file (defaultall) π―-ignorefilename β don't report on the file (defaultnone) π-select_reRE β append to REs of files to select (defaultnone) π-ignore_reRE β append to REs of files to ignore (defaultnone) π«-relative_onlyβ for XS, ignore absolute paths (defaultoff) π-gcov_chdirβ for XS, run gcov in subdirs (defaultoff) π-write[db] β write the merged database (defaultoff) βοΈ-deleteβ drop database(s) (defaultoff) ποΈ-dump_dbβ dump database(s) (for debugging) (defaultoff) π-coveragecriterion β report on criterion (default all available) β-testβ drop database(s) and runmake test(defaultoff) π§ͺ-gcovβ run gcov to cover XS code (defaultonif using gcc) π-makemake_prog β use the given 'make' program for 'make test' π¨-prefer_libβ prefer files in lib (defaultoff) π-ignore_covered_errβ allow covering uncoverable code (defaultoff) π«Ά-add_uncoverable_pointstring-delete_uncoverable_pointstring-clean_uncoverable_points-uncoverable_filefile- other options specific to the report format
- coverage_database [coverage_database ...]
also!! the -report, -select, -ignore, -select_re, -ignore_re, and -coverage options may be specified multiple times. go off, stack them. π₯
π REPORT FORMATS π
the following -report options are available in the core module. other reports may be available if they've been installed from external packages β so check your installed goodies bestie.
html|html_minimal (default)
HTML reporting. percentage thresholds are colour-coded and configurable via -report_c0 <integer>, -report_c1 <integer> and -report_c2 <integer>.:
0% 75% 90% 100%
| .. | .. | .. |
<c0 <c1 <c2 c3
red yellow orange green
look at that gradient, it's giving traffic light but make it fashion. π¦
html_basic
HTML reporting with syntax highlighting if PPI::HTML or Perl::Tidy module is detected. like html|html_minimal reporting, percentage thresholds are colour-coded and configurable. β¨
text
plain text reporting. simple. elegant. no notes. πΈ
compilation
a textual report in a format similar to that output by Perl itself such that the report may be used by your editor or other reporting tools to show where coverage is missing. handy for the editor girlies. π»
json
a report in JSON format. data girlies rise. π
vim
a report suitable for use with the vim editor to show coverage data in the sign column. for the terminal besties who never leave vim (respect). π
π DETAILS π
any number of coverage databases may be specified on the command line. these databases will be merged and the reports will be based on the merged information. if no databases are specified the default database (cover_db) will be used.
the -write option will write out the merged database. if no name is given for the new database, the first database read in will be overwritten. when this option is used no reports are generated by default. so like, heads up.
specify the -select, -select_re, -ignore, and -ignore_re options to report on specific files. -select and -ignore are interpreted as shell globs; -select_re and -ignore_re are interpreted as regular expressions.
specify -coverage options to report on specific criteria. by default all available information on all criteria in all files will be reported. available coverage options are statement, branch, condition, subroutine, pod, and default (which equates to all available options). however, if you know you only want coverage information for certain criteria it is better to only collect data for those criteria in the first place by specifying them at that point. this will make the data collection and reporting processes faster and less memory intensive. see the documentation for Devel::Cover for more information.
if you want all except some criteria, then you can say something like -coverage default,-pod. the exclusion era, we love her. π
if you specify multiple -report options, make sure that they do not conflict. for example, the different HTML reports will overwrite each other's results. that's not a slay, that's a mess, so watch out bestie. π
the -test option will delete the databases and run your tests to generate new coverage data before reporting on it. Devel::Cover knows how to work with standard Perl Makefiles as well as Module::Build based distributions. for detailed instructions see the documentation for ExtUtils::MakeMaker at https://metacpan.org/module/ExtUtils::MakeMaker or for Module::Build at https://metacpan.org/module/Module::Build both of which come as standard in recent Perl distributions.
the -gcov option will try to run gcov on any XS code. this requires that you are using gcc of course. if you are using the -test option will be turned on by default. if you have XS code in subdirectories, you will probably need to add the -gcov_chdir option since gcov seems to work better with that.
the -prefer_lib option tells Devel::Cover to report on files in the lib directory even if they were used from the blib directory.
the -ignore_covered_err option will not flag an error if uncoverable code is covered.
ok important: -test deletes your databases before running the tests. no take-backs. she's dramatic like that. π
π₯ EXIT STATUS π₯
the following exit values are returned:
0β all operations were completed successfully. we love a clean exit. π«Ά>0β an error occurred. not the vibe. π
with the -test option the exit status of the underlying test run is returned.
π§ 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
and that's the whole thing bestie π this page is from User Contributed Perl Documentation, it's perl v5.42.3, and it was dated 2026-08-22. so yeah β go get your coverage, drink water, and remember: no cap, cover fr fr slays. πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: libdevel-cover-perl 1.52-1build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms