PerlDocPlugin

Based on PyDocPlugin by Alec Thomas.

Uses a python-based parser to extract Pod documentation from named Perl modules or to produce indexes of Perl modules/directories.

Installation

See also TracPlugins.

svn co http://trac.eprints.org/svn/iar/trunk/pyperldoc/0.9 perldoc
cd perldoc
python setup.py install

Enable the module by adding to trac.ini:

[components]
tracperldoc.* = enabled

Restart Apache if you're using mod_python.

Configuration

You must configure the plugin for it to do anything useful. To specify directories to search through use pod.paths and svn.paths for the file system and code repository respectively:

[perldoc]
pod.paths = /home/smithy/perl_lib:/usr/lib/perl5/5.8.5/
svn.paths = /trunk/myproj/lib

To get a full list of directories for your Perl installation execute the following in perl:

print join ':', splice(@INC,0,-1);

To get the perl* (e.g. perlfunc) pages linking correctly add the pod path (/usr/lib/perl5/5.8.5/pod in RHEL4).

Permissions

By default tracperldoc checks BROWSER_VIEW for permissions. To change this specify a privilege by using view.permission in [perldoc] (currently Trac 0.9 doesn't support bespoke permissions).

[perldoc]
view.permission = WIKI_VIEW

Usage

Supported Formats

All files with the extensions .pod and .pm are searched for and parsed for pod pragmas (see perlpod).

Wiki

To link to Perl Doc use the perldoc wiki link:

A wiki link: [perldoc:URI] or, to show an index: [perldoc:URI*]

Known Bugs

PerlDoc? doesn't handle POD encodings, so may produce bad pages if there's non-ASCII in the source POD.

Attachments