NAME

Devel::Cover::Report::XSCover - a self-contained HTML report for Devel::Cover

SYNOPSIS

cover -report XSCover
xs_cover

The name is typed as XSCover: cover upper-cases only the first letter of a report name to find its module, so xscover would look for Xscover.

DESCRIPTION

An HTML report for any Devel::Cover database, Perl only or with the C side that xs_cover adds. It writes coverage.html and one page per file into the database directory, and nothing else. Every page stands on its own: the styles are inline, there is a dark theme that follows the system and a button to override it, a few lines of script sort and filter the summary and move between uncovered lines, and no library or external resource is loaded.

The summary page shows the totals as tiles, then a table of every file with a bar and a percentage for each criterion, sortable by any column and filtered by a search box. A module whose XS file is in the report has a link to it on its row.

A file page shows the source with the coverage drawn beside each line: the statement count, each branch as chips with the times each arm was taken (T and F for a Perl branch, A and B for a C branch in the order the compiler laid the arms out, one chip per arm of a switch), each condition as a percentage that opens into its truth table (for C under gcc 14 and later, one per term of a decision, with its true and false outcomes), each subroutine as a chip with its name, and the pod and time columns where they exist. Lines with an uncovered item are marked, and clicking one opens a row that says in words what is missing. n and p move between them and open that row. Checkboxes hide and show each kind of mark, a legend explains them, and pod and anything after __END__ is dimmed.

OPTIONS

The same as the other HTML reports: -outputfile for the summary page's name, -summarytitle for its title, and -report_c0, -report_c1 and -report_c2 for the thresholds below which a percentage is red, orange and yellow (75, 90 and 100).

METHODS

get_options

Reads the options above from the command line.

report

Devel::Cover::Report::XSCover->report($db, $options);

Writes the pages for the files in $options->{file} into $options->{outputdir}.

SEE ALSO

Devel::Cover, Devel::XSCover