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. 😏


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