PPI::Format::Apache - mod_perl hook for perl syntax highlighting


    # In httpd.conf
    PerlModule PPI::Format::Apache
    <Files ~ "\.pm$">
        SetHandler perl-script
        PerlHandler PPI::Format::Apache
        # PerlSetVar Colour Off
        # PerlSetVar LineNumbers Off


PPI, via PPI::Format::HTML, provides a method for converting perl source code into nice looking HTML.

PPI::Format::Apache provides a convenient Apache mod_perl interface to hook this functionality up, automatically syntax highlighting any perl documents ( as specified by their extension ).


It is recommended you add PPI::Format::Apache to be loaded at server startup, via the command

    PerlModule PPI::Format::Apache

PPI consumes 2-3 meg of memory, and it is far better than this is done once and shared, rather than have every Apache child process do it seperately.

The SetHandler and PerlHandler commands are as per normal for an Apache mod_perl handler. See the mod_perl docs for more details.


By default, PPI::Format::Apache will show files syntax highlighted and with line numbers. You can set either or both of the following two options to turn colour or line numbers off.

    PerlSetVar Colour Off
    PerlSetVar LineNumbers Off


Add the ability to see the raw file
As PPI is somewhat slow, add the ability to cache the generated HTML


For general comments, contact the author.

To file a bug against this module, in a way you can keep track of, see the CPAN bug tracking system.


        Adam Kennedy ( maintainer )




Copyright (c) 2002 Adam Kennedy. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.