NAME

Genezzo::Havok - Cry Havok! And Let Slip the Dogs of War!

SYNOPSIS

use Genezzo::Havok; # Wreak Havok

create table havok ( hid number, modname char, owner char, creationdate char, flag char );

hid - a unique id number
modname - a havok module name
owner - module owner
creationdate - date of row creation
flag - (user-defined)
version - module version information

DESCRIPTION

After database startup, the Havok subsystem runs arbitrary code to modify your Genezzo installation.

WHY?

Havok lets you construct novel, sophisticated extensions to Genezzo as "plug-ins". The basic Genezzo database kernel can remain small, and users can download and install additional packages to extend Genezzo's functionality. This system also gives you a modular upgrade capability.

Examples

See Genezzo::Havok::UserExtend, a module that lets users install custom functions or entire packages. The Havok regression test, t/Havok1.t, loads Text::Soundex and demonstrates a soundex comparison of strings in a table. You can easily add other string or mathematical functions.

ARGUMENTS

FUNCTIONS

HavokInit Calls the HavokInit for every module in the havok table, supplying a hash of the dictionary, the flag, and the module version. The clients should return an array where the first element is a success code (0 or 1) and the second is the updated flag (if necessary).
HavokCleanup

EXPORT

LIMITATIONS

Havok is intended for specialized packages which extend the fundamental database mechanisms. If you only want to add new SQL functions, then you should use Genezzo::Havok::UserExtend.

TODO

Create dictionary initialization havok (vs post-startup havok)
Need some type of first-time registration function. For example, if your extension module needs to install new dictionary tables. Probably can add arg to havokinit, and add a flag to havok table to track init status.
Safety/Security: could load modules using Safe package to restrict their access (not a perfect solution). May also want to construct a dictionary wrapper to restrict dictionary capabilities for certain clients, e.g. let a package read, but not update, certain dictionary tables.
Force Init/ReInit when new package is loaded.
update module flags if necessary, handle cleanup

AUTHOR

Jeffrey I. Cohen, jcohen@genezzo.com

SEE ALSO

perl(1).

Copyright (c) 2004 Jeffrey I Cohen. All rights reserved.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Address bug reports and comments to: jcohen@genezzo.com

For more information, please visit the Genezzo homepage at http://www.genezzo.com