API:EPrints/Test/Pod2Wiki

From EPrints Documentation
Revision as of 15:13, 25 February 2010 by Tdb01r (talk | contribs)
Jump to: navigation, search

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


API: Core API

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


NAME

EPrints::Test::Pod2Wiki - convert EPrints pod to MediaWiki

User Comments


Editing Pod2Wiki Pages

Pages generated by this module have Pod2Wiki markers inserted. These markers are HTML comments that start and end every Plain Old Documentation (POD) section. For example a POD synopsis section will look like this:

 <!-- Pod2Wiki=head_synopsis -->
 ==SYNOPSIS==
 use EPrints::Test::Pod2Wiki;
 my $p = EPrints::Test::Pod2Wiki-&gt;new(
   wiki_index =&gt; "http://wiki.foo.org/index.php",
   username =&gt; "johnd",
   password =&gt; "xiPi00",
 );
 $p-&gt;update_page( "EPrints::Utils" );
 <!-- Edit below this comment -->
 <!-- Pod2Wiki= -->
 

When the Wiki page is updated each Pod2Wiki section is replaced with the equivalent section content from the POD.

Comments can be made by adding them to the comment sections:

 ...
 <!-- Pod2Wiki=head_methods -->
 ==METHODS==
 Any changes here will be lost
 <!-- Edit below this comment -->
 This Wiki comment will be kept.
 <!-- Pod2Wiki= -->
 ...
 

Note: if a POD section is removed any Wiki content associated with that section will also be removed.

The rest of this page concerns the EPrints::Test::Pod2Wiki module.

User Comments


SYNOPSIS

 use EPrints::Test::Pod2Wiki;
 
 my $p = EPrints::Test::Pod2Wiki->new(
   wiki_index => "http://wiki.foo.org/index.php",
   username => "johnd",
   password => "xiPi00",
   );
 
 $p->update_page( "EPrints::Utils" );
 

User Comments


DESCRIPTION

This module enables the integration of EPrints POD (documentation) and MediaWiki pages.

User Comments


METHODS

User Comments


new

EPrints::Test::Pod2Wiki->new( ... )

Create a new Pod2Wiki parser. Required options:

 wiki_index - URL of the MediaWiki "index.php" page
 username - MediaWiki username
 password - MediaWiki password
 

User Comments


update_page

$ok = $pod->update_page( $package_name )

Update the MediaWiki page for $package_name.

User Comments


command

$parser->command( ... )

Pod::Parser callback.

User Comments


verbatim

$parser->verbatim( ... )

Pod::Parser callback.

User Comments


textblock

$parser->textblock( ... )

Pod::Parser callback.

User Comments


interpolate

$parser->interpolate( ... )

Pod::Parser callback. Overloaded to also escape HTML entities.

User Comments


interior_sequence

$parser->interior_sequence( ... )

Pod::Parser callback.

User Comments