NAME

GT::Plugins - a plugin interface for Gossamer Threads products.


SYNOPSIS

    use GT::Plugins;
    GT::Plugins->dispatch ('/path/to/plugin/dir', 'plugin_name', \&code_ref, @args);
    GT::Plugins->dispatch_method ('/path/to/plugin/dir', 'plugin_name', $self, 'method', @args);


DESCRIPTION

The plugin module provides dispatch() the heart of the entire system. The dispatch function takes a plugin name and does the following:

1. Loads the plugin config file.

2. Runs any registered PRE hooks found in the config file.

2a. If no hooks are found, or hooks found but the hook does not set the action to STOP, the code_ref passed in is run.

2b. If a hook sets the action to STOP, then the code ref is not run.

3. Runs any registered POST hooks found in the config file

4. Returns last result.

Also included as part of the plugin system are some modules for web based tools to manage plugins:

the GT::Plugins::Manager manpage - Add, remove and edit plugin files.

the GT::Plugins::Wizard manpage - Create shell plugins.

the GT::Plugins::Installer manpage - Used in installing plugins.

Setting the $PROFILE variable in the .pm file will cause the module method to catch dipatches and write information related to their calling in a new file called hooks.cfg in the same directory as plugins.cfg.


COPYRIGHT

Copyright (c) 2004 Gossamer Threads Inc. All Rights Reserved. http://www.gossamer-threads.com/


VERSION

Revision: $Id: Plugins.pm,v 1.48 2004/01/13 01:35:16 jagerman Exp $