Dist::...:Slicer(3pm)

πŸ“¦
version 0.202 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Dist::...:Slicer(3pm) πŸ’–

okay bestie so real talk β€” this page lives in the User Contributed Perl Documentation manual, and it's the whole lore on Dist::Zilla::Role::PluginBundle::Config::Slicer. yes that name is a mouthful, we're gonna get through it together 🫢


✨ NAME ✨

Dist::Zilla::Role::PluginBundle::Config::Slicer β€” it's giving "pass portions of bundle config to plugins" πŸ’…


🌸 VERSION 🌸

version 0.202


πŸŽ€ SYNOPSIS πŸŽ€

so here's the vibe, literally verbatim:

# 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)
lowkey important: Config::Slicer should probably go last. unless you're doing something more complex, in which case go off i guess πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

bestie listen. this role is the fairy godmother 🧚 of your Dist::Zilla Plugin Bundle β€” it lets your bundle accept configuration customizations for the plugins it's gonna load, and then it merges them transparently. no drama, no manual merging, it just handles it.

here's what that looks like:

# dist.ini
[@MyBundle]
option = 1
Included::Plugin.attribute = overwrite value
AnotherPlug.array[0] = append value
AnotherPlug.array[1] = append another value

want the full tea on how those configs actually get handled? go read "CONFIGURATION SYNTAX" in Config::MVP::Slicer. that's where the details live, fr fr.

okay so mechanically: this role adds a method modifier to bundle_config β€” and bundle_config is the method that the root PluginBundle role requires, and that PluginBundle::Easy wraps. iconic behavior honestly.

after bundle_config gets called, the modifier swoops in and updates the returned plugin configurations with any values you customized in the main bundle config. slay.

and ngl, most of the actual work is done by Dist::Zilla::Config::Slicer (which is a subclass of Config::MVP::Slicer). so if you want this same functionality but you do not want to consume this role in your bundle, go check out those modules instead. they got you 🫢


🌈 SEE ALSO 🌈

  • Config::MVP::Slicer
  • Dist::Zilla
  • Dist::Zilla::Config::Slicer
  • Dist::Zilla::Role::PluginBundle
  • Dist::Zilla::Role::PluginBundle::Easy
  • Dist::Zilla::PluginBundle::ConfigSlicer

πŸ‘‘ AUTHOR πŸ‘‘

Randy Stauner <rwstauner@cpan.org> β€” the main character who made this happen πŸ’–


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.

so basically: it's free software, you can redistribute and/or modify it, same terms as the Perl 5 programming language system itself. periodt πŸ’…

and that's the whole page bestie ✨ this was Dist::...:Slicer(3pm) from perl v5.34.0, dated 2022-06-13, and you're officially caught up πŸŽ€ no cap 🫢

πŸ“¦ where this page comes from