PurpleWiki::Sequence - Generates sequences for node IDs
use PurpleWiki::Sequence; my $dataDir = '/wikidb'; my $url = 'http://purplewiki.blueoxen.net/cgi-bin/wiki.pl'; my $sequence = new PurpleWiki::Sequence($dataDir); $sequence->getNext;
Generates IDs in base 36 (10 digits + 26 uppercase alphabet) for use as node IDs.
Constructor. $datadir contains the Wiki configuration/database directory. There, PurpleWiki::Sequence stores the last used ID and an index of node IDs to fully qualified URLs (used by Transclusion.pm).
Optionally takes a second argument which points to a URL from which nids can be retrieved. This is an experimental feature and should not be relied upon to stick around.
Returns the next ID, increments and updates the last used ID appropriately. If $url is passed, also updates the NID to URL index.
Returns the URL in the index associated with the given NID, or undef if there isn't one.
Chris Dent, <cdent@blueoxen.org>
Eugene Eric Kim, <eekim@blueoxen.org>
PurpleWiki::Parser::WikiText, PurpleWiki::Transclusion.
To install PurpleWiki::ACL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PurpleWiki::ACL
CPAN shell
perl -MCPAN -e shell install PurpleWiki::ACL
For more information on module installation, please visit the detailed CPAN module installation guide.