NAME
App::SmokeBox::Mini::Plugin - minismokebox plugins
DESCRIPTION
This document describes the App::SmokeBox::Mini::Plugin system for App::SmokeBox::Mini and minismokebox.
Plugins are a mechanism for providing additional functionality to App::SmokeBox::Mini and minismokebox.
It is assumed that plugins will be POE based and consist of at least one POE::Session.
INITIALISATION
The plugin constructor is init
. App::SmokeBox::Mini uses Module::Pluggable to find plugins beneath the App::SmokeBox::Mini::Plugin namespace and will attempt to call init
on each plugin class that it finds.
init
will be called with one parameter, a hashref that contains keys for each section of the minismokebox configuration file, (which utilises Config::Tiny).
The role of the plugin is to determine if an appropriate section exists for its own configuration.
If no appropriate configuration exists, then init
must return undef
.
If appropriate configuration does exist, then the plugin may start a POE::Session.
App::SmokeBox::Mini will watch for a _child
event indicating that it has gained a plugin child session. It will detach this child after making a note of the child's session ID which it will use to send the following events.
EVENTS
sbox_smoke
sbox_stop
AUTHOR
Chris BinGOs
Williams <chris@bingosnet.co.uk>
LICENSE
Copyright © Chris Williams
This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details.