Dist::Zilla - Why you should use @Starter instead of @Basic

grinnz

Dan

Posted on March 9, 2021

Dist::Zilla - Why you should use @Starter instead of @Basic

I posted previously about a new "starter" bundle for Dist::Zilla, the CPAN author's automation tool. I'd like to briefly try to answer the question: "Why should I care?"

If you're already happily using Dist::Zilla with an extensive configuration or plugin bundle of your own, this bundle isn't for you. But maybe you can get some ideas from the included plugins, I added a few to my author bundle!

If you're looking to get started in Dist::Zilla, the @Starter bundle makes a great starting point. Usage is similar to @Basic and all of the same information in the dzil.org tutorial applies.

If you're currently using @Basic, there are a few reasons you should consider switching over. @Basic has become somewhat outdated as it needs to maintain compatibility with existing configs; @Starter modernizes the base plugin set. For example, it includes the important [MetaJSON] plugin for generating modern CPAN metadata, and it uses [RunExtraTests] to run xt/ (extra) tests directly, which is now generally preferred over rewriting them into the t/ directory with the [ExtraTests] plugin. It also adds a few popular plugins, such as [Test::ReportPrereqs], which generates a test that lists all distribution prereqs and the currently installed versions, very helpful for debugging test failures.

Even if you're already including all of these improvements yourself on top of @Basic, using @Starter can cut down on the boilerplate in your dist.ini, and you can simply remove any plugins you want to leave out, or configure included plugins directly via config slicing. Plus, it can help incorporate new practices and features; @Starter will include future updates as new revisions, which you can review and switch to by setting the revision number in your dist.ini. This allows it to stay modern without breaking existing configs.

Switching from @Basic to @Starter is generally straightforward. Most minimal configurations can be directly switched over, removing any manually-included plugins that @Starter adds itself. If you are using @Filter, you can instead apply the -remove option directly to @Starter. The "CONFIGURING" section of the documentation goes over the most common ways to configure the bundle.

Feel free to stop by #distzilla on irc.perl.org or send me an email (address listed in module documentation) if you have any questions about the bundle, configuration, or Dist::Zilla in general. Happy releasing!

Since the original publication of this post, @Starter has reached revision 5 and the @Starter::Git variant bundle has been added for additional convenience. I will be republishing my other posts on @Starter in the coming week.

💖 💪 🙅 🚩
grinnz
Dan

Posted on March 9, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Introduction to Messaging Systems with Kafka
distributedsystems Introduction to Messaging Systems with Kafka

November 28, 2024

Cacti Kurulumu
cacti Cacti Kurulumu

November 27, 2024

Perl Weekly #696 - Perl 5 is Perl
perl Perl Weekly #696 - Perl 5 is Perl

November 25, 2024