Dist::Zilla::Role::PluginBundle::Config::Slicer - Pass Portions of Bundle Config to Plugins
version 0.200
# in Dist::Zilla::PluginBundle::MyBundle with ( 'Dist::Zilla::Role::PluginBundle', # or PluginBundle::Easy 'Dist::Zilla::Role::PluginBundle::Config::Slicer' ); # Config::Slicer should probably be last # (unless you're doing something more complex)
This role enables your Dist::Zilla Plugin Bundle to accept configuration customizations for the plugins it will load and merge them transparently.
# dist.ini [@MyBundle] option = 1 Included::Plugin.attribute = overwrite value AnotherPlug.array[] = append value
This role adds a method modifier to bundle_config, which is the method that the root PluginBundle role requires, and that PluginBundle::Easy wraps.
bundle_config
PluginBundle
PluginBundle::Easy
After bundle_config is called the modifier will update the returned plugin configurations with any values that were customized in the main bundle config.
Most of the work is done by Dist::Zilla::Config::Slicer (a subclass of Config::MVP::Slicer). Check out those modules if you want the same functionality but don't want to consume this role in your bundle.
Config::MVP::Slicer
Dist::Zilla
Dist::Zilla::Config::Slicer
Dist::Zilla::Role::PluginBundle
Dist::Zilla::Role::PluginBundle::Easy
Dist::Zilla::PluginBundle::ConfigSlicer
Randy Stauner <rwstauner@cpan.org>
This software is copyright (c) 2011 by Randy Stauner.
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::Config::Slicer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dist::Zilla::Config::Slicer
CPAN shell
perl -MCPAN -e shell install Dist::Zilla::Config::Slicer
For more information on module installation, please visit the detailed CPAN module installation guide.