CGI::Wiki 0.62 review

Download
by rbytes.net on

CGI::Wiki is a toolkit for building Wikis. Helps you develop Wikis quickly by taking care of the boring bits for you

License: Perl Artistic License
File size: 61K
Developer: Kake Pugh
0 stars award from rbytes.net

CGI::Wiki is a toolkit for building Wikis.

Helps you develop Wikis quickly by taking care of the boring bits for you. You will still need to write some code - this isn't an instant Wiki.

SYNOPSIS

# Set up a wiki object with an SQLite storage backend, and an
# inverted index/DB_File search backend. This store/search
# combination can be used on systems with no access to an actual
# database server.

my $store = CGI::Wiki::Store::SQLite->new(
dbname => "/home/wiki/store.db" );
my $indexdb = Search::InvertedIndex::DB::DB_File_SplitHash->new(
-map_name => "/home/wiki/indexes.db",
-lock_mode => "EX" );
my $search = CGI::Wiki::Search::SII->new(
indexdb => $indexdb );

my $wiki = CGI::Wiki->new( store => $store,
search => $search );

# Do all the CGI stuff.
my $q = CGI->new;
my $action = $q->param("action");
my $node = $q->param("node");

if ($action eq 'display') {
my $raw = $wiki->retrieve_node($node);
my $cooked = $wiki->format($raw);
print_page(node => $node,
content => $cooked);
} elsif ($action eq 'preview') {
my $submitted_content = $q->param("content");
my $preview_html = $wiki->format($submitted_content);
print_editform(node => $node,
content => $submitted_content,
preview => $preview_html);
} elsif ($action eq 'commit') {
my $submitted_content = $q->param("content");
my $cksum = $q->param("checksum");
my $written = $wiki->write_node($node, $submitted_content, $cksum);
if ($written) {
print_success($node);
} else {
handle_conflict($node, $submitted_content);
}
}

Requirements:
Perl

CGI::Wiki 0.62 keywords