AxKit2::Plugin 1.1 reviewDownload
AxKit2::Plugin is a base class for all plugins. An AxKit2 plugin allows you to hook into various parts of processing requests and
AxKit2::Plugin is a base class for all plugins.
An AxKit2 plugin allows you to hook into various parts of processing requests and modify the behaviour of that request. This class is the base class for all plugins and this document covers both the details of the base class, and the available hooks and the consequences the return codes for those hooks have.
See "AVAILABLE HOOKS" for the hooks, and "API" for the API provided to all plugins.
WRITING A SIMPLE PLUGIN ^
Most plugin authors should start at AxKit2::Docs::WritingPlugins. However a hook consists of the following things:
An init() method for initialising state.
A register() method for registering hooks outside of the default naming scheme.
A number of conf_*() methods to define configuration directives.
A number of hook_*() methods to implement your hooks.
Any number of helper methods.
Although plugins are classes, they do not need the usual perl extra stuff such as a package declaration, a constructor (such as new()), nor do they require the annoying "1;" at the end of the file. AxKit2 adds those things in for you.
All plugins are simple blessed hashes.
AxKit2::Plugin 1.1 keywords