CPAN RT

PPI::HTML is a HTML syntax highlighter for Perl source code.
Because it is based on PPI it can correctly parse just about anything you can possibly throw at it,
and then flexibly generate a HTML version based on any arbitrary colour scheme you wish,
or use a standalone CSS file for it's style information.

This initial version is primarily intended to serve as a highlighting service to a AJAX-based syntax highlighter.

The handler recieves a chunk of Perl source code from the browser in the CGI 'code' parameter,
and a second 'ajax' param determines if the highlighter is running in AJAX mode.

In AJAX mode,
the fragment of formatted HTML is handed back straight up,
without any surrounding body or headers or the other parts of the HTML wrapper.

With AJAX mode off,
it returns a complete HTML document.

With this initial version,
you may have some difficulties getting CSS actually working.

We recommend you wait for the next release,
which will support a range of pre-packaged colour schemes being created for PPI::HTML.