NAME CGI::Wiki - A toolkit for building Wikis. DESCRIPTION Helps you develop Wikis quickly by taking care of the boring bits for you. The aim is to allow different types of backend storage and search without you having to worry about the details. NOTE WHEN UPGRADING FROM PRE-0.24 VERSIONS There was a small interface change to list_recent_changes between versions 0.23 and 0.24 - see the 'Changes' file for details. IMPORTANT NOTE WHEN UPGRADING FROM PRE-0.20 VERSIONS The database schema changed between versions 0.14 and 0.15, and again between versions 0.16 and 0.20 - see the 'Changes' file for details. This is really kinda important, please do check this out or your code will die when it tries to use any existing databases. SIGNIFICANT RECENT CHANGES 0.30 22 April 2003 Added support for supplying 'host' parameter when connecting to MySQL/Postgres databases (requested and assisted by Paul Makepeace). 0.27 5 April 2003 Added ->reinitialise_stores method to CGI::Wiki::TestConfig::Utilities to make it easier for plugins and so forth to make sure they have nice virginal test stores before they start running their tests. 0.25 29 March 2003 list_recent_changes can now filter on a single metadata criterion. 0.24 29 March 2003 list_recent_changes now returns any metadata attached to the node as well - 'perldoc CGI::Wiki::Store::Database' for details. 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 ); MAJOR METHODS write_node $wiki->write_node($node_name, $content, $checksum); $wiki->write_node( "Calthorpe Arms", "A rather nice pub on Gray's Inn Road", $checksum, { category => [ "Pub", "Pub Food", "Bloomsbury" ] } ); format my $cooked = $wiki->format($raw); delete_node $wiki->delete_node($node_name); list_all_nodes my @node_names = $wiki->list_all_nodes; list_backlinks my @links_to_me = $wiki->list_backlinks($node_name); list_nodes_by_metadata my @pubs = $wiki->list_nodes_by_metadata( metadata_type => "category", metadata_value => "Pub" ); list_recent_changes my @last_week_edits = $wiki->list_recent_changes( days => 7 ); my @last_ten_changes = $wiki->list_recent_changes( last_n_changes => 10 ); node_exists print "Got wombats" if $wiki->node_exists("Wombats"); retrieve_node my $homepage_content = $wiki->retrieve_node("Home Page"); my %node_data = $wiki->retrieve_node( $node_name ); print "Last Modified: $node_data{last_modified}\n"; print "Current Version: $node_data{version}\n"; print "Current Checksum: $node_data{checksum}\n"; print "Current Content: $node_data{content}\n"; print "Categories: " . join(", ", @{$node_data{metadata}{category}}) . "\n"; verify_checksum my $as_i_left_it = $wiki->verify_checksum( $node_name, $checksum ); search_nodes my @nodes = $search->nodes( "camel" );