NAME
App::Embra::Role::Plugin - something that gets plugged into App::Embra
VERSION
version 0.001
DESCRIPTION
This role provides a few key methods and attributes which all plugins for App::Embra should implement. It consumes the Logging role, altering log prefix
to include the plugin's name, and logger
to reuse the logger
from the instance of App::Embra being plugged into.
ATTRIBUTES
embra
The instance of App::Embra into which the plugin was plugged.
name
The name of the plugin, generally set to the name used in the configuration file when read by App::Embra::MVP::Assembler. Defaults to the class name of the implementer.
METHODS
register_plugin
App::Embra::Role::Plugin->register_plugin( $class, $name, $args, $embra );
Static method which creates a new instance of the implementing plugin with its name
set to $name
, embra
set to $embra
, and each entry of the $args
hash ref passed as an argument to the constructor. It then plugs new instance into $embra
. Returns the created instance.
AUTHOR
Daniel Holz <dgholz@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2015 by Daniel Holz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.