Apache2::Pod::HTML - base class for converting Pod files to prettier forms
Version 0.24
A simple mod_perl handler to easily convert Pod to HTML or other forms. You can also emulate perldoc.
Add the following lines to your httpd.conf.
<Files *.pod> SetHandler perl-script PerlHandler Apache2::Pod::HTML </Files>
All *.pod files will magically be converted to HTML.
The following configuration should go in your httpd.conf
<Location /perldoc> SetHandler perl-script PerlHandler Apache2::Pod::HTML PerlSetVar STYLESHEET auto PerlSetVar LINKBASE http://www.example.com/docs/ </Location>
You can then get documentation for a module Foo::Bar at the URL http://your.server.com/perldoc/Foo::Bar
Foo::Bar
http://your.server.com/perldoc/Foo::Bar
Note that you can also get the standard Perl documentation with URLs like http://your.server.com/perldoc/perlfunc or just http://your.server.com/perldoc for the main Perl docs.
http://your.server.com/perldoc/perlfunc
http://your.server.com/perldoc
Finally, you can search for a particular Perl keyword with http://your.server.com/perldoc/f/keyword The 'f' is used by analogy with the -f flag to perldoc.
http://your.server.com/perldoc/f/keyword
-f
perldoc
Specifies the stylesheet to use with the output HTML file.
<Location /perldoc> SetHandler perl-script PerlHandler Apache2::Pod::HTML PerlSetVar STYLESHEET auto </Location>
Specifying 'auto' for the stylesheet will cause the built-in CSS stylesheet to be used. If you prefer, you can replace the word 'auto' with the URL of your own custom stylesheet file.
When INDEX is true, a table of contents is added at the top of the HTML document.
<Files *.pod> SetHandler perl-script PerlHandler Apache2::Pod::HTML PerlSetVar INDEX 1 </Files>
By default, this is off.
When GZIP is true, the whole HTTP body is compressed. The user's browser must accept gzip, and Compress::Zlib must be available. Otherwise, GZIP is ignored.
<Files *.pod> SetHandler perl-script PerlHandler Apache2::Pod::HTML PerlSetVar GZIP 1 </Files>
Specifying an optional LINKBASE variable changes the external HTTP links to use a URL prefix of your specification instead of using Pod::Simple::HTML's default. Using the magic word LOCAL will make links local instead of external.
LINKBASE
LOCAL
Apache2::Pod, Apache2::Pod::Text
Theron Lewis <theron at theronlewis dot com>
<theron at theronlewis dot com>
Adapteded from Andy Lester's <andy at petdance dot com> Apache::Pod package which was adapted from Apache2::Perldoc by Rich Bowen <rbowen@ApacheAdmin.com>
<andy at petdance dot com>
<rbowen@ApacheAdmin.com>
Thanks also to Pete Krawczyk, Kjetil Skotheim, Kate Yoak and Chris Eade for contributions.
This package is licensed under the same terms as Perl itself.
To install Apache2::Pod, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache2::Pod
CPAN shell
perl -MCPAN -e shell install Apache2::Pod
For more information on module installation, please visit the detailed CPAN module installation guide.