Perl Doc Plugin

Extract the Perl documentation (POD) from a Perl module and display it in a topic

Syntax Rules and Example

Write %PERLDOC{"Module"}% to display the documentation of a Perl module, for example %PERLDOC{"File::Copy"}% shows the doc of File::Copy. Optionally use a format="pod" parameter to see the raw POD format, or format="twiki" to see the TWiki markup text.

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

PerlDocPlugin: Nothing to do, no module specified.

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.6/pod/perlpod.html

POD example:

=head1 Demo of POD

Silly paragraph

=cut

Perl code with TWiki markup

TWiki markup can be used inside a =begin twiki ... =end twiki block. Keep in mind that this markup gets parsed correctly only by the PerlDocPlugin, other POD translator ignore the block. The TWiki markup is richer and more compact then POD. Example:

=begin twiki
---++ Demo of TWiki markup
Silly paragraph

=end twiki

=cut

Limitations

  • Links (L<....>) are not supported

Plugin Installation Instructions

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

Like many other TWiki extensions, this module is shipped with a fully automatic installer script written using the BuildContrib.

  • If you have TWiki 4.2 or later, you can install from the configure interface (Go to Plugins->Find More Extensions)
  • If you have any problems, then you can still install manually from the command-line:
    1. Download one of the .zip or .tgz archives
    2. Unpack the archive in the root directory of your TWiki installation.
    3. Run the installer script ( perl <module>_installer )
    4. Run configure and enable the module, if it is a plugin.
    5. Repeat for any missing dependencies.
  • If you are still having problems, then instead of running the installer script:
    1. Make sure that the file permissions allow the webserver user to access all files.
    2. Check in any installed files that have existing ,v files in your existing install (take care not to lock the files when you check in)
    3. Manually edit LocalSite.cfg to set any configuration variables.

Plugin Info

Plugin Author: TWiki:Main.PeterThoeny
Copyright: © 2002-2011 TWiki:Main.PeterThoeny;
© 2008-2011 TWiki:TWiki.TWikiContributor
License: GPL (GNU General Public License)
Plugin Version: 21730 (2011-07-13)
Change History:  
2011-07-13: TWikibug:Item6725: Change global package variables from "use vars" to "our"
2011-01-25: TWikibug:Item6638: Doc improvements
2010-08-25: TWikibug:Item6530: Fix for TWiki-5.0; doc improvements; changing TWIKIWEB to SYSTEMWEB
20 May 2007 Fixed for TWiki-4, added "=pod", repackaged with BuildContrib - TWiki:Main.CrawfordCurrie
07 Dec 2002: Removed "=pod" from showing up in html or twiki blocks
01 Dec 2002: Initial version
Dependencies: %$DEPENDENCIES
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/PerlDocPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/PerlDocPluginDev

Related Topics: TWikiPreferences, TWikiPlugins, AdminToolsCategory

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2011-07-14 - TWikiContributor
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    TWiki21Nov All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback