CGI::Pretty(3)
π NAME π
Okay bestie, welcome to the CGI::Pretty(3) page β yep, User Contributed Perl Documentation vibes. This is the module to produce nicely formatted HTML code. Cute concept, honestly. πβ¨
π¨ CGI::Pretty IS DEPRECATED π¨
Real talk: CGI::Pretty is deprecated, no cap. It will be removed from the CGI distribution in a future release, so you should no longer use it and remove it from any code that currently uses it. Periodt. π
For now it has been reduced to a shell to prevent your code breaking, but the "pretty" functions will no longer output "pretty" HTML. So if you came here for the formatting glow-up... it's giving deprecated shell, not pretty HTML. ππ
π Alternatives π
The page points at these alternatives, bestie β not me making stuff up, this is literally the list:
The combo HTML::HTML5::Parser + HTML::HTML5::Writer + XML::LibXML::PrettyPrint goes like this:
print HTML::HTML5::Writer->new(
start_tags => 'force',
end_tags => 'force',
)->document(
XML::LibXML::PrettyPrint->new_for_html( indent_string => "\t" )
->pretty_print(
HTML::HTML5::Parser->new->parse_string( $html_string )
)
);
Marpa::R2::HTMLβ see thehtml_fmtscript for examplesHTML::TidyHTML::Parser
okay thatβs the whole page, bestie β signing off from CGI::Pretty(3) with perl v5.42.0, dated 2025-01-09 πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-CGI 4.670.0-160000.2.2 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms