Dist::Zilla::Role::PluginLoader - A Plugin that can load others.
version 0.001003
You probably don't want to use this module. You either want a @PluginBundle, or PluginLoader::Configurable
@PluginBundle
PluginLoader::Configurable
You don't want a plugin bundle
You want something harder to understand for people who use your plugin.
You EXPRESSLY wish to hide the loaded modules from things like Dist::Zilla::App::Command::bakeini
Dist::Zilla::App::Command::bakeini
You are loading a single, or handful of modules, all of which are BLATANTLY obvious DIRECTLY in dist.ini, except with some special loading semantics.
dist.ini
Do make consuming plugins have to declare the loaded plugin somehow
Do make consuming plugins able to directly configure the loaded plugin somehow
If at all possible, load at most, one plugin.
If at all possible, and you are loading only one plugin, use PluginLoader::Configurable
If you have read this far, and you still are considering using this Role, please contact me, kentnl on #distzilla@irc.perl.org, and let me convince you not to.
kentnl
#distzilla@irc.perl.org
use Moose; with 'Dist::Zilla::Role::Plugin', 'Dist::Zilla::Role::PluginLoader'; sub load_plugins { my ( $self, $loader ) = @_; # Load raw config $loader->load ( 'GatherDir', 'GatherDir-for-FooPlugin', [ include_dotfiles => 1, key => value, ... ]); # Load using ini style input $loader->load_ini( 'GatherDir', 'GatherDir2-for-FooPlugin', [ 'include_dotfiles = 1', 'key = value', ... ]); }
load_plugins
Signature:
void < load_plugins( $self, $loader ); $loader isa Dist::Zilla::Util::PluginLoader;
See Dist::Zilla::Util::PluginLoader for details.
Dist::Zilla::Util::PluginLoader
plugin_from_config
$object < plugin_from_config( $class, $plugin_name, $args, $section ) $object does Dist::Zilla::Role::Plugin $class does Dist::Zilla::Role::Plugin $plugin_name is Str $args is HashRef $section isa Config::MVP::Section
Recommended Provider:
with 'Dist::Zilla::Role::Plugin';
Dist::Zilla::Role::Plugin
Kent Fredric <kentnl@cpan.org>
This software is copyright (c) 2017 by Kent Fredric <kentfredric@gmail.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Dist::Zilla::Role::PluginLoader, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dist::Zilla::Role::PluginLoader
CPAN shell
perl -MCPAN -e shell install Dist::Zilla::Role::PluginLoader
For more information on module installation, please visit the detailed CPAN module installation guide.