NAME

OpenGuides::Utils - General utility methods for OpenGuides scripts.

DESCRIPTION

Provides general utility methods for OpenGuides scripts. Distributed and installed as part of the OpenGuides project, not intended for independent installation. This documentation is probably only useful to OpenGuides developers.

SYNOPSIS

  use CGI::Wiki;
  use Config::Tiny;
  use OpenGuides::Utils;

  my $config = Config::Tiny->read( "wiki.conf" );
  my $wiki = OpenGuides::Utils->make_wiki_object( config => $config );

METHODS

make_wiki_object
  my $config = Config::Tiny->read( "wiki.conf" );
  my $wiki = OpenGuides::Utils->make_wiki_object( config => $config );

Croaks unless a Config::Tiny object is supplied. Returns a CGI::Wiki object made from the given config file on success, croaks if any other error occurs.

The config file needs to define at least the following variables:

  • dbtype - one of postgres, mysql and sqlite

  • dbname

  • indexing_directory - for the Search::InvertedIndex files to go

AUTHOR

The OpenGuides Project (openguides-dev@openguides.org)

COPYRIGHT

     Copyright (C) 2003 The OpenGuides Project.  All Rights Reserved.

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