Skip to topic | Skip to bottom
Home
TWiki
TWiki.PerlDoc2Pluginr1.1 - 20 Jul 2005 - 19:34 - TWikiGuesttopic end

Start of topic | Skip to actions

Perl Doc TWO Plugin

This Plugin extracts the Perl documentation (POD) from a Perl module located in the @INC library path and displays it in a topic.

Syntax Rules and Example

Write %PERLDOC2{"Module"}% to display the documentation of a Perl module, for example %PERLDOC2{"MIME::Base64"}% shows the doc of MIME::Base64. Optionally use a format="pod2html" parameter to get output rendered by pod2html utility, part of Perl distribution.

Use the following form to see the documentation of a Perl module: (this Plugin needs to be installed and enabled)

Perl module name: in format

Perl code with POD (Plain Old Documentation)

Perl code may contain blocks of documentation. A block typically starts with a =pod or =head1 at the beginning of a line, and ends with =cut at the beginning of a line or at the end of the file. Read the details in http://www.perldoc.com/perl5.8/pod/perlpod.html

POD example:

=head1 Demo of POD

Silly paragraph

=cut

PerlDoc2Plugin Global Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %PODTOTWIKIPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Extract the Perl documentation (POD) from a Perl module (with Pod::HtmlEasy, or pod2html) and display it in a topic.

  • Debug Plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

Plugin Installation Instructions

Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip PerlDoc2Plugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/PerlDoc2Plugin.txt Plugin topic
    data/TWiki/PerlDoc2Plugin.txt,v Plugin topic repository
    lib/TWiki/Plugins/PerlDoc2Plugin.pm Plugin Perl module
  • Test above example if the installation was successful. You should see a "Nothing to do, no module specified" message below the form if the Plugin is enabled.

Plugin Info

Plugin Author: TWiki:Main.ToniPrug
Plugin Version: 20 July 2005 (V1.001)
Change History:  
20 July 2005: Initial version (V1.001)
CPAN Dependencies: Pod::HtmlEasy
Other Dependencies: pod2html
Perl Version: 5.008
TWiki:Plugins/Benchmark: GoodStyle 100%, FormattedSearch 100%, PerlDoc2Plugin 99%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/PerlDoc2Plugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/PerlDoc2PluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/PerlDoc2PluginAppraisal

-- ToniPrug - 20 Jul 2005
to top


You are here: TWiki > PerlDoc2Plugin

to top

Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Open-org? Send feedback