The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

CGI::Wiki::Kwiki

DESCRIPTION

A simple front-end to CGI::Wiki, including import capability from CGI::Kwiki, designed as a transition module from a CGI::Kwiki wiki to something a little more powerful. It provides most of the methods you'd expect from a wiki - change control and listing, conflict management, database backends, etc.

METHODS

new

Creates a new CGI::Wiki::Kwiki object. Expects some options, most have defaults, a few are required. Here's how you'd call the constructor - all values here are defaults, the values you must provide are marked.

    my $wiki = CGI::Wiki::Kwiki->new(
        db_type => 'MySQL',
        db_user => undef,                     # required
        db_pass => '',
        db_name => undef,                     # required
        formatter_type => 'Default',
        allowed_tags => ['p','b','i','pre'],
        site_name => 'CGI::Wiki::Kwiki site',
        admin_email => 'email@invalid',
        template_path => undef,               # required
        home_node => 'HomePage',
        cgi_path => CGI::url(),
        search_map => './search_map',
    );

the db_type and formatter_type refer to CGI::Wiki::Store::[type] and CGI::Wiki::Formatter::[type] classes respectively.

Valid values for db_type are 'MySQL', SQLite', etc, see the CGI::Wiki man page and any other CGI::Wiki::Store classes you have on your system. db_user and db_pass will be used to access this database.

Likewise, valid values of formatter_type are 'Default', 'Kwiki', 'POD', etc. allowed_tags is a list of HTML that is allowed, and is passed to the formatter object. Not all formatter objects use this information.

This method tries to create the store, formatter and wiki objects, and will die() if it has a problem. It is the calling script's responsibility to catch any exceptions and tell the user.

run

Runs the wiki object, and outputs to STDOUT the result, including the CGI header. Takes no options.

    $wiki->run();

-head1 TODO

Things I still need to do

Polish templates
Import script should catch case-sensitive dupes better

SEE ALSO

CGI::Wiki

AUTHOR

Tom Insam (tom@jerakeen.org)

CREDITS

Thanks to Kake for writing CGI::Wiki, and providing the initial patches to specify store and formatter types in the config. And for complaining at me till I released things.

COPYRIGHT

     Copyright (C) 2003 Tom Insam.  All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.