{
    "mode": "man",
    "parameter": "cover",
    "section": "1p",
    "url": "https://www.chedong.com/phpMan.php/man/cover/1p/json",
    "generated": "2026-06-15T13:12:36Z",
    "synopsis": "cover -test\ncover -report htmlbasic",
    "sections": {
        "NAME": {
            "content": "cover - report coverage statistics\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 1.36\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "cover -test\n\ncover -report htmlbasic\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Report coverage statistics in a variety of formats.\n\nThe summary option produces a short textual summary.  Other reports are available by using\nthe report option.\n\nThe following reports are currently available:\n\nhtml        - detailed HTML reports  (default)\nhtmlbasic  - detailed HTML reports with syntax highlighting\ntext        - detailed textual summary\ncompilation - output in a format similar to Perl errors\njson        - output in a JSON format\nvim         - show coverage information in vim gutter\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "The following command line options are supported:\n\n-h -help              - show help\n-i -info              - show documentation\n-v -version           - show version\n\n-silent               - don't print informational messages (default off)\n-summary              - give summary report                (default on)\n-report reportformat - report format                      (default html)\n-outputdir dir        - directory for output               (default given db)\n-launch               - launch report in viewer (if avail) (default off)\n\n-select filename      - only report on the file            (default all)\n-ignore filename      - don't report on the file           (default none)\n-selectre RE         - append to REs of files to select   (default none)\n-ignorere RE         - append to REs of files to ignore   (default none)\n-write [db]           - write the merged database          (default off)\n-delete               - drop database(s)                   (default off)\n-dumpdb              - dump database(s) (for debugging)   (default off)\n\n-coverage criterion   - report on criterion  (default all available)\n\n-test                 - drop database(s) and run make test (default off)\n-gcov                 - run gcov to cover XS code     (default on if using gcc)\n-make makeprog       - use the given 'make' program for 'make test'\n-preferlib           - prefer files in lib                (default off)\n\n-adduncoverablepoint    string\n-deleteuncoverablepoint string",
            "subsections": [
                {
                    "name": "-clean_uncoverable_points",
                    "content": "-uncoverablefile         file\n\nother options specific to the report format\n\ncoveragedatabase [coveragedatabase ...]\n\nThe \"-report\", \"-select\", \"-ignore\", \"-selectre\", \"-ignorere\", and \"-coverage\" options may\nbe specified multiple times.\n"
                }
            ]
        },
        "REPORT FORMATS": {
            "content": "The following \"-report\" options are available in the core module.  Other reports may be\navailable if they've been installed from external packages.\n\nhtml|htmlminimal (default)\nHTML reporting. Percentage thresholds are colour-coded and configurable via -reportc0\n<integer>, -reportc1 <integer> and -reportc2 <integer>.:\n\n0%      75%      90%      100%\n|   ..   |   ..   |   ..   |\n<c0      <c1      <c2   c3\nred     yellow   orange green\n\nhtmlbasic\nHTML reporting with syntax highlighting if PPI::HTML or Perl::Tidy module is detected.\nLike html|htmlminimal reporting, percentage thresholds are colour-coded and\nconfigurable.\n\ntext\nPlain text reporting.\n\ncompilation\nA textual report in a format similar to that output by Perl itself such that the report\nmay be used by your editor or other reporting tools to show where coverage is missing.\n\njson\nA report in JSON format.\n\nvim A report suitable for use with the vim editor to show coverage data in the sign column.\n",
            "subsections": []
        },
        "DETAILS": {
            "content": "Any number of coverage databases may be specified on the command line.  These databases will\nbe merged and the reports will be based on the merged information.  If no databases are\nspecified the default database (coverdb) will be used.\n\nThe \"-write\" option will write out the merged database.  If no name is given for the new\ndatabase, the first database read in will be overwritten.  When this option is used no\nreports are generated by default.\n\nSpecify the \"-select\", \"-selectre\", \"-ignore\", and \"-ignorere\" options to report on\nspecific files.  \"-select\" and \"-ignore\" are interpreted as shell globs; \"-selectre\" and\n\"-ignorere\" are interpreted as regular expressions.\n\nSpecify \"-coverage\" options to report on specific criteria.  By default all available\ninformation on all criteria in all files will be reported.  Available coverage options are\nstatement, branch, condition, subroutine, pod, and default (which equates to all available\noptions).  However, if you know you only want coverage information for certain criteria it is\nbetter to only collect data for those criteria in the first place by specifying them at that\npoint.  This will make the data collection and reporting processes faster and less memory\nintensive.  See the documentation for Devel::Cover for more information.\n\nIf you want all *except* some criteria, then you can say something like \"-coverage\ndefault,-pod\".\n\nIf you specify multiple \"-report\" options, make sure that they do not conflict.  For example,\nthe different HTML reports will overwrite each other's results.\n\nThe \"-test\" option will delete the databases and run your tests to generate new coverage data\nbefore reporting on it.  Devel::Cover knows how to work with standard Perl Makefiles as well\nas Module::Build based distributions.  For detailed instructions see the documentation for\nExtUtils::MakeMaker at <https://metacpan.org/module/ExtUtils::MakeMaker> or for Module::Build\nat <https://metacpan.org/module/Module::Build> both of which come as standard in recent Perl\ndistributions.\n\nThe \"-gcov\" option will try to run gcov on any XS code.  This requires that you are using gcc\nof course.  If you are using the \"-test\" option will be turned on by default.\n\nThe \"-preferlib\" option tells Devel::Cover to report on files in the lib directory even if\nthey were used from the blib directory.\n",
            "subsections": []
        },
        "EXIT STATUS": {
            "content": "The following exit values are returned:\n\n0   All operations were completed successfully.\n\n>0  An error occurred.\n\nWith the -test option the exit status of the underlying test run is returned.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "Devel::Cover\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Did I mention that this is alpha code?\n\nSee the BUGS file.\n",
            "subsections": []
        },
        "LICENCE": {
            "content": "Copyright 2001-2019, Paul Johnson (paul@pjcj.net)\n\nThis software is free.  It is licensed under the same terms as Perl itself.\n\nThe latest version of this software should be available from my homepage: http://www.pjcj.net\n\n\n\nperl v5.34.0                                 2022-02-06                                    COVER(1p)",
            "subsections": []
        }
    },
    "summary": "cover - report coverage statistics",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "-uncoverablefile file other options specific to the report format coveragedatabase [coveragedatabase ...] The \"-report\", \"-select\", \"-ignore\", \"-selectre\", \"-ignorere\", and \"-coverage\" options may be specified multiple times."
        }
    ],
    "examples": [],
    "see_also": []
}