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 </Files>
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.
SetHandler
PerlHandler
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
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/
Adam Kennedy ( maintainer ) cpan@ali.as http://ali.as/
PPI::Manual, http://ali.as/CPAN/PPI
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.
To install PPI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PPI
CPAN shell
perl -MCPAN -e shell install PPI
For more information on module installation, please visit the detailed CPAN module installation guide.