1Dist::Zilla::Role::PlugUisneBrunCdolnDeti:rs:itPb:lu:utZgeiidlnlRPaee:mr:olRvoeDlroe(c:3u:)mPelnutgaitniBounndle::PluginRemover(3)
2
3
4
6 Dist::Zilla::Role::PluginBundle::PluginRemover - Add '-remove'
7 functionality to a bundle
8
10 version 0.105
11
13 # in Dist::Zilla::PluginBundle::MyBundle
14
15 with (
16 'Dist::Zilla::Role::PluginBundle', # or PluginBundle::Easy
17 'Dist::Zilla::Role::PluginBundle::PluginRemover'
18 );
19
20 # PluginRemover should probably be last
21 # (unless you're doing something more complex)
22
24 This role enables your Dist::Zilla Plugin Bundle to automatically
25 remove any plugins specified by the "-remove" attribute (like @Filter
26 does):
27
28 [@MyBundle]
29 -remove = PluginIDontWant
30 -remove = OtherDumbPlugin
31
32 If you want to use an attribute named "-remove" for your own bundle you
33 can override the "plugin_remover_attribute" sub to define a different
34 attribute name:
35
36 # in your bundle package
37 sub plugin_remover_attribute { 'scurvy_cur' }
38
39 This role adds a method modifier to "bundle_config", which is the
40 method that the root "PluginBundle" role requires, and that
41 "PluginBundle::Easy" wraps.
42
44 plugin_remover_attribute
45 Returns the name of the attribute containing the array ref of plugins
46 to remove.
47
48 Defaults to "-remove".
49
50 remove_plugins
51 $class->remove_plugins(\@to_remove, @plugins);
52 $class->remove_plugins(['Foo'], [Foo => 'DZP::Foo'], [Bar => 'DZP::Bar']);
53
54 Takes an arrayref of plugin names to remove (like what will be in the
55 config payload for "-remove"), removes them from the list of plugins
56 passed, and returns the remaining plugins.
57
58 This is used by the "bundle_config" modifier but is defined separately
59 in case you would like to use the functionality without the voodoo that
60 occurs when consuming this role.
61
62 The plugin name to match against all plugins can be given as either the
63 plugin moniker (like you might provide in your config file, expanded
64 via "expand_config" in Dist::Zilla::Util), or the unique plugin name
65 used to differentiate multiple plugins of the same type. For example,
66 in this configuration:
67
68 [Foo::Bar / plugin 1]
69 [Foo::Bar / plugin 2]
70
71 passing 'Foo::Bar' to "remove_plugins" will remove both these plugins
72 from the configuration, but only the first is removed when passing
73 'plugin 1'.
74
76 Perldoc
77 You can find documentation for this module with the perldoc command.
78
79 perldoc Dist::Zilla::Role::PluginBundle::PluginRemover
80
81 Websites
82 The following websites have more information about this module, and may
83 be of help to you. As always, in addition to those websites please use
84 your favorite search engine to discover more resources.
85
86 • MetaCPAN
87
88 A modern, open-source CPAN search engine, useful to view POD in
89 HTML format.
90
91 <http://metacpan.org/release/Dist-Zilla-Role-PluginBundle-PluginRemover>
92
93 Bugs / Feature Requests
94 Please report any bugs or feature requests by email to
95 "bug-dist-zilla-role-pluginbundle-pluginremover at rt.cpan.org", or
96 through the web interface at
97 <https://rt.cpan.org/Public/Bug/Report.html?Queue=Dist-Zilla-Role-PluginBundle-PluginRemover>.
98 You will be automatically notified of any progress on the request by
99 the system.
100
101 Source Code
102 <https://github.com/rwstauner/Dist-Zilla-Role-PluginBundle-PluginRemover>
103
104 git clone https://github.com/rwstauner/Dist-Zilla-Role-PluginBundle-PluginRemover.git
105
107 Randy Stauner <rwstauner@cpan.org>
108
110 Karen Etheridge <ether@cpan.org>
111
113 This software is copyright (c) 2011 by Randy Stauner.
114
115 This is free software; you can redistribute it and/or modify it under
116 the same terms as the Perl 5 programming language system itself.
117
118
119
120perl v5.34.0 Dist:2:0Z2i2l-l0a1:-:2R1ole::PluginBundle::PluginRemover(3)