MooX::PluginRoles::Base - find and apply plugin roles
# do not use directly
MooX::PluginRoles::Base implements the core PluginRoles logic. It is used by MooX::PluginRoles, and is not expected to be used directly.
MooX::PluginRoles::Base
MooX::PluginRoles
Name of the package that is calling MooX::PluginRoles
ArrayRef of classes within the base namespace that can be extended
Directory to search for plugins
Directory within plugin_dir to search for roles
plugin_dir
Roles provided for each class by each available plugin, hashed by extendable class and plugin
Add the given client to the list of clients using this base package.
Parameters:
Name of client package
File of client package
Line number where client package included base class
ArrayRef of plugins to use
Module::Pluggable::Object is used to search the plugin role directories.
An anonymous class is created for each base class with each unique set of plugins, using Eval::Closure.
All clients are tracked, with their specified set of plugins, so that the proper anonymous classes can be used when the base class constructors are called within each client's namespace.
The base class constructors are wrapped by creating an anonymous role wrapping new method, using the caller's namespace to determine the appropriate anonymous class to construct.
new
Noel Maddy <zhtwnpanta@gmail.com>
Copyright 2016 Noel Maddy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install MooX::PluginRoles, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooX::PluginRoles
CPAN shell
perl -MCPAN -e shell install MooX::PluginRoles
For more information on module installation, please visit the detailed CPAN module installation guide.