Dist::Zilla::PluginBundle::Starter - A new way to start using Dist::Zilla

Dist::Zilla is an extremely powerful and versatile CPAN authoring tool, which has enabled me to reliably publish many distributions with minimal fuss. It has the ability to automate your entire distribution building, testing, and releasing process, customized to almost any workflow, but this ability does not come without cost. One of the biggest difficulties newcomers face is sorting out the overwhelming number of available plugins and how to use them together effectively. A good way to start is with the tutorials at dzil.org and the standard [@Basic] plugin bundle. Unfortunately, the [@Basic] bundle is out of date; notably, it does not include the [MetaJSON] plugin, to generate META.json which is now the preferred metadata format for CPAN distributions. For backwards compatibility reasons the bundle itself can't easily be updated with new plugins.

[@Starter] is an attempt at an improved, more customizable beginner's plugin bundle, with a revision feature to try to avoid the problem of stagnation while being able to retain backwards compatibility. The revision defaults to 1 unless set explicitly, and future incompatible changes will be made by adding new revisions, which must then be selected by the author using the bundle. Also, the popular PluginRemover and Config::Slicer plugin bundle roles are composed in, allowing the author to remove or configure bundled plugins as desired.

The first revision also includes a number of improvements and updates to [@Basic], while remaining unopinionated and unobtrusive. The previously mentioned [MetaJSON] is included by default, as well as a few plugins for more complete distribution metadata, and a few plugins that add basic sanity tests to the build. Two of the tests are author-only tests that check that the pod syntax is valid and the modules compile. The third is a simple test that prints a report of the installed prerequisites, useful for diagnosing test failures. [RunExtraTests] is included instead of [ExtraTests], because instead of moving and rewriting your extra tests (tests in xt/), it leaves them there and modifies Dist::Zilla's testing routines to run them directly. Finally, [ReadmeAnyFromPod] is used instead of [Readme] to generate a text README from your main module's documentation, rather than a generic README.

These plugins are sufficient to build and release a complete distribution reliably, but there are many more tasks Dist::Zilla can automate for you, like maintaining your module versions and automatically managing git or other version control. The "EXTENDING" section of the documentation describes some of the available options. Many of these are features of miyagawa's excellent Dist::Milla bundle, which is much more opinionated, but can be another great way to start using Dist::Zilla if you use git version control, and heavily influenced my own author bundle.

I hope this new bundle is useful to those getting started with Dist::Zilla or just looking for an updated bundle similar to [@Basic], and as with all matters Dist::Zilla, please stop by #distzilla on irc.perl.org if you need help!

1 Comment

Thank you for taking the time to explain it and share the differences. Looks really good!

I always wished for a website that curates dzil plugins...

Leave a comment

About Grinnz

user-pic I blog about Perl.