1Dist::Zilla::Role::PlugUisneBrunCdolnet:r:iEbaustye(d3D)Piesrtl::DZoiclulmae:n:tRaotlieo:n:PluginBundle::Easy(3)
2
3
4
6 Dist::Zilla::Role::PluginBundle::Easy - something that bundles a bunch
7 of plugins easily
8
10 version 6.017
11
13 package Dist::Zilla::PluginBundle::Example;
14 use Moose;
15 with 'Dist::Zilla::Role::PluginBundle::Easy';
16
17 sub configure {
18 my $self = shift;
19
20 $self->add_plugins('VersionFromModule');
21 $self->add_bundle('Basic');
22 }
23
25 This role builds upon the PluginBundle role, adding methods to take
26 most of the grunt work out of creating a bundle. It supplies the
27 "bundle_config" method for you. In exchange, you must supply a
28 "configure" method, which will store the bundle's configuration in the
29 "plugins" attribute by calling "add_plugins" and/or "add_bundle".
30
32 name
33 This is the bundle name, taken from the Section passed to
34 "bundle_config".
35
36 payload
37 This hashref contains the bundle's parameters (if any), taken from the
38 Section passed to "bundle_config".
39
40 plugins
41 This arrayref contains the configuration that will be returned by
42 "bundle_config". You normally modify this by using the "add_plugins"
43 and "add_bundle" methods.
44
46 add_plugins
47 $self->add_plugins('Plugin1', [ Plugin2 => \%plugin2config ])
48
49 Use this method to add plugins to your bundle.
50
51 It is passed a list of plugin specifiers, which can be one of a few
52 things:
53
54 • a plugin moniker (like you might provide in your config file)
55
56 • an arrayref of: "[ $moniker, $plugin_name, \%plugin_config ]"
57
58 In the case of an arrayref, both $plugin_name and "\%plugin_config" are
59 optional.
60
61 The plugins are added to the config in the order given.
62
63 add_bundle
64 $self->add_bundle(BundleName => \%bundle_config)
65
66 Use this method to add all the plugins from another bundle to your
67 bundle. If you omit %bundle_config, an empty hashref will be supplied.
68
69 config_slice
70 $hash_ref = $self->config_slice(arg1, { arg2 => 'plugin_arg2' })
71
72 Use this method to extract parameters from your bundle's "payload" so
73 that you can pass them to a plugin or subsidiary bundle. It supports
74 easy renaming of parameters, since a plugin may expect a parameter name
75 that's too generic to be suitable for a bundle.
76
77 Each arg is either a key in "payload", or a hashref that maps keys in
78 "payload" to keys in the hash being constructed. If any specified key
79 does not exist in "payload", then it is omitted from the result.
80
82 Ricardo SIGNES 😏 <rjbs@cpan.org>
83
85 This software is copyright (c) 2020 by Ricardo SIGNES.
86
87 This is free software; you can redistribute it and/or modify it under
88 the same terms as the Perl 5 programming language system itself.
89
90
91
92perl v5.32.1 2021-D0i1s-t2:7:Zilla::Role::PluginBundle::Easy(3)