NAME
Test::CPAN::Health::Reporter::HTML - Render a health report as an HTML document
SYNOPSIS
use Test::CPAN::Health::Reporter::HTML;
my $reporter = Test::CPAN::Health::Reporter::HTML->new;
my $html = $reporter->render($report);
open my $fh, '>', 'report.html';
print {$fh} $html;
DESCRIPTION
Produces a self-contained HTML5 document from a Test::CPAN::Health::Report. The document includes all CSS inline and has no external dependencies; it may be opened directly in a browser or saved to disk.
Each check result is a colour-coded table row. Detail strings appear below the summary within the same row. The overall score and status summary are shown prominently at the top of the page.
LIMITATIONS
No JavaScript is used; the output is not interactive.
Long detail strings are not wrapped.
render
PURPOSE
Render a Report to a self-contained HTML5 string.
API SPECIFICATION
INPUT
report Test::CPAN::Health::Report required
OUTPUT
Scalar string: valid HTML5 document (UTF-8).
MESSAGES
Code | Severity | Message | Resolution
------+----------+------------------------------------+---------------------
HTM01 | FATAL | report must be a Report object | Pass a Report instance
FORMAL SPECIFICATION
-- Z schema (placeholder) --
RenderOp
report : Report
html! : String
-------------------------------------------------------
html! contains report.overall_score
valid_html5(html!)
SIDE EFFECTS
None.
USAGE EXAMPLE
my $html = $reporter->render($report);
open my $fh, '>', 'report.html' or die $!;
print {$fh} $html;
AUTHOR
Nigel Horne, <njh at nigelhorne.com>
LICENSE AND COPYRIGHT
Copyright (C) 2025-2026 Nigel Horne.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.