- SEE ALSO
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, <email@example.com>
Eugene Eric Kim, <firstname.lastname@example.org>