NAME

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

SYNOPSIS

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

DESCRIPTION

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 ).

Configuration

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.

Options

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

TO DO

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

SUPPORT

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.

http://rt.cpan.org/

AUTHOR

        Adam Kennedy ( maintainer )
        cpan@ali.as
        http://ali.as/

SEE ALSO

PPI::Manual, http://ali.as/CPAN/PPI

COPYRIGHT

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.