Dist::Z...le::Easy(3)
πΈ Dist::Zilla::Role::PluginBundle::Easy(3) β the vibe
okay bestie, welcome to the manual page for Dist::Zilla::Role::PluginBundle::Easy, section 3 of your friendly neighborhood man pages. This is the User Contributed Perl Documentation zone, and today we're learning how to bundle a bunch of plugins easily. it's giving "let's make the grunt work disappear" and honestly? slay. π
β¨ VERSION β¨
version 6.040 β that's the one, no cap. π
π¦ SYNOPSIS π¦
here's the whole vibe in code, look at her go:
package Dist::Zilla::PluginBundle::Example;
use Moose;
with 'Dist::Zilla::Role::PluginBundle::Easy';
sub configure {
my $self = shift;
$self->add_plugins('VersionFromModule');
$self->add_bundle('Basic');
}
like... that's it. that's the whole pattern. iconic behavior fr fr. β¨
π DESCRIPTION π
So this role is built on top of the PluginBundle role, bestie β it adds a bunch of methods specifically so you can take most of the grunt work out of creating a bundle. nobody wants to do grunt work, we're not doing that. π
Here's the trade, okay? It gives you the bundle_config method for free. no work, it's just there, gift-wrapped. π
But in exchange β and this is the part where you have to pull your weight β you must supply a configure method. That method is your job, your moment, your main character scene. Inside it, you store the bundle's configuration in the plugins attribute by calling add_plugins and/or add_bundle. that's the whole assignment. π«Ά
π PERL VERSION π
okay so the rule here is simple: this module should work on any version of perl still receiving updates from the Perl 5 Porters. and what does that mean, you ask? it means any version of perl released in the last two to three years.
here's the example so it's crystal clear: if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38. periodt. π
and yes, it may work on older versions of perl β but do not come for me, because no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. so if you're on some ancient perl, live your truth, but know the vibes could change. π
πΈ ATTRIBUTES πΈ
name
This is the bundle name, and it's taken from the Section passed to bundle_config. that's it, that's the attribute. β¨
payload
This hashref contains the bundle's parameters (if any), also taken from the Section passed to bundle_config. if there are no parameters, then bestie, it's just... an empty vibe. π
plugins
This arrayref contains the configuration that is going to be returned by bundle_config. You normally modify this by using the add_plugins and add_bundle methods β like, that's the move. don't go poking at it directly when you've got perfectly good methods right there. π
π METHODS π
add_plugins
$self->add_plugins('Plugin1', [ Plugin2 => \%plugin2config ])
Use this method to add plugins to your bundle. go off. π₯
It gets passed a list of plugin specifiers, and each specifier can be one of a few things:
- a plugin moniker (like you might provide in your config file) β classic, we love her
- an arrayref of:
[ $moniker, $plugin_name, \%plugin_config ]
In the case of an arrayref, both $plugin_name and \%plugin_config are optional. so don't stress if you don't have them, they can simply not exist, we're flexible like that. π¦
The plugins are added to the config in the order given. order matters, bestie β it's a whole sequencing moment. β
add_bundle
$self->add_bundle(BundleName => \%bundle_config)
Use this method to add all the plugins from another bundle to your bundle. it's a bundle-ception situation and honestly it's so convenient. π
If you omit %bundle_config, an empty hashref will be supplied. so you don't even have to write anything if there's nothing to say. noted. π
config_slice
$hash_ref = $self->config_slice(arg1, { arg2 => 'plugin_arg2' })
Use this method to extract parameters from your bundle's payload so that you can pass them along to a plugin or a subsidiary bundle. β¨
It supports easy renaming of parameters, which is a big deal, because a plugin may expect a parameter name that's just too generic to be suitable for a bundle. like imagine naming your whole bundle's setting name, that's chaos. πͺοΈ
Each arg is either a key in payload, or a hashref that maps keys in payload to keys in the hash being constructed. And here's the important caveat, do not skip this: if any specified key does not exist in payload, then it is omitted from the result. no error, no drama, it just quietly doesn't show up. πΈ
π AUTHOR π
Ricardo SIGNES π <cpan@semiotic.systems>
the man, the myth, the legend. π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2026 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like... go ahead bestie, it's yours, same terms as Perl 5, no cap. π«Ά
and that's the whole page! π this man page came to you courtesy of perl v5.42.3 on 2026-10-19, for Dist::Zilla::Role::PluginBundle::Easy in section 3 of your manual pages. go build a bundle, you're gonna slay it. bye bestie! πβ¨ππ¦
π¦ where this page comes from
- fedora 44: perl-Dist-Zilla 6.040-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms