CGI::Pretty(3pm)

CGI::Pretty3pm

Module to produce nicely formatted html code

CGI::Pretty IS DEPRECATED

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.

For now it has been reduced to a shell to prevent your code breaking, but the "pretty" functions will no longer output "pretty" HTML.

Alternatives

HTML::HTML5::Parser + HTML::HTML5::Writer + XML::LibXML::PrettyPrint:

    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 the html_fmt script for examples)

HTML::Tidy

HTML::Parser

Releases

12 releases since Debian 2.2 (Potato); the text changed 11 times.

  1. 2.2
  2. 3.0
  3. 5.0
  4. 6.0
  5. 7
  6. 8
  7. 9
  8. 10
  9. 11
  10. 12
  11. 13
  12. Arch

From perl-cgi 4.72-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.