IM::Engine::PluggableConstructor - provide new_with_plugins
new_with_plugins
Some plugins need to extend built-in classes. For example, IM::Engine::Plugin::State needs to extend IM::Engine::User with methods such as get_state and set_state. This role provides a new constructor new_with_plugins to classes that need to be extensible. Plugins can then specify roles to use for the instance, as well as additional constructor parameters.
get_state
set_state
A string representing the role that can extend the consuming class. The role specifier uses the same rules as MooseX::Traits: prefix a + character to specify an absolute role name, otherwise the class's _trait_namespace is prepended.
+
_trait_namespace
An alternate constructor that includes additional parameters specified by plugins. This also extends the traits option to include additional traits specified by plugins.
traits
You must pass the engine argument so we can ask plugins about what to include.
engine
To install IM::Engine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IM::Engine
CPAN shell
perl -MCPAN -e shell install IM::Engine
For more information on module installation, please visit the detailed CPAN module installation guide.