Andy Lester > Apache-Pod-0.22 > Apache::Pod::HTML

Download:
Apache-Pod-0.22.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  8
Open  1
View/Report Bugs
Module Version: 0.22   Source  

NAME ^

Apache::Pod::HTML - base class for converting Pod files to prettier forms

VERSION ^

Version 0.22

SYNOPSIS ^

A simple mod_perl handler to easily convert Pod to HTML or other forms. You can also emulate perldoc.

CONFIGURATION ^

Pod-to-HTML conversion

Add the following lines to your httpd.conf.

    <Files *.pod>
        SetHandler perl-script
        PerlHandler Apache::Pod::HTML
    </Files>

All *.pod files will magically be converted to HTML.

perldoc emulation

The following configuration should go in your httpd.conf

    <Location /perldoc>
        SetHandler  perl-script
        PerlHandler Apache::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

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.

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.

CONFIGURATION VARIABLES ^

STYLESHEET

Specifies the stylesheet to use with the output HTML file.

    <Location /perldoc>
        SetHandler  perl-script
        PerlHandler Apache::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.

INDEX

When INDEX is true, a table of contents is added at the top of the HTML document.

    <Files *.pod>
        SetHandler perl-script
        PerlHandler Apache::Pod::HTML
        PerlSetVar INDEX 1
    </Files>

By default, this is off.

GZIP

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 Apache::Pod::HTML
        PerlSetVar GZIP 1
    </Files>

By default, this is off.

LINKBASE

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.

AUTHOR ^

Andy Lester <andy@petdance.com>, adapted from Apache::Perldoc by Rich Bowen <rbowen@ApacheAdmin.com>

LICENSE ^

This package is licensed under the same terms as Perl itself.

syntax highlighting: