Telephone +44(0)1524 64544
Email: info(at)shadowcat.co.uk

Mon Dec 15 21:15:00 2014

mstpan 11 - Distribution Building

The wonderful thing about tarballs is there's so many ways to make one.

ExtUtils::MakeMaker

The original classic distribution builder. Beloved by people who like Makefiles. Hated by pretty much everybody else.

Has actually started adding features again recently due to acquiring a contributor young, foolish and enthusiastic enough to be willing to risk the SAN points involved. Hopefully we can successfully balance progress and 'not breaking CPAN'.

Still an excellent workhorse on the installation side, but people are increasingly using other things as author side tooling.

Being as I'm one of the strange people who likes Makefiles, I'm using some small wrappers around EUMM myself but wrote them to make me happy rather than get people to adopt them. If you're sufficiently curious, find a repo or tarball for one of my dists that has a maint/ directory, rm META.yml and run the Makefile.PL.

Module::Build

Written with the aim of getting right many of the things the author believed ExtUtils::MakeMaker got wrong, Module::Build inevitably got a bunch of different things wrong instead, and the extension system rapidly ended up as a mess architecturally.

I am really really glad that this was written, because it helped us understand where we wanted to go in the future, but I try and avoid dealing with it myself, because if I want to cut myself on stupid design mistakes caused by failure to accurately guess the future, I have DBIx::Class code to write.

This is still probably the least unpleasant way to do complex cross-platform compilation stuff where you need to customise the build process, but other than that there are better options.

Module::Install

THE SPIDERS THE SPIDERS THE SPIDERS ARE COMING FOR ME THE SPIDERS ARE COMING FOR ME THE SPIDERS ARE COMING FOR ME THE SPIDERS THE SPIDERS.

Written by audrey and ingy, while both of them were annoyed. The end result is basically a giant tower of crack. It was, in its day, an incredibly useful giant tower of crack, but ... let's say "I enjoyed using it, but I never enjoyed helping other people fix their usage of it" and leave it at that.

Module::Build::Tiny

Written with the aim of handling all the simple cases at least as well as Module::Build while leaving behind as many of the architectural mistakes as possible.

Appears to have succeeded.

Note that Module::Build::Tiny is actually a pure installer, and doesn't do author side stuff at all, so you need to use something else to actually build the distribution tarball - App::ModuleBuiltTiny provides an mbtiny script that'll do this, or read on for other options.

Dist::Zilla

MECHADISTZILLA DESTROY TOKYO.

Maximum overkill for distribution building with a huge ecosystem - if you want to do clever-ish things like generated POD, automatic $VERSION management etc. then you really need to look at Dist::Zilla. It can happily generate tarballs that use ExtUtils::MakeMaker or Module::Build or Module::Build::Tiny - or, in fact, all three, as evidenced by my Object::Tap module.

Be aware however that with great power comes a plethora of ways to find yourself missing a foot - as rjbs once commented, "if Dist::Zilla were a physical tool, it would have black and yellow stripes".

Dist::Milla

In which miyagawa picks a set of dzil plugins for you and bundles them up in an attractive looking box with a ribbon tied into a bow.

If you think you may need ultimate power later but don't know where to start, this is a perfectly sensible choice.

Minilla

Aimed at being a maximum underkill sister to Dist::Milla with a near identical API, this is a great place to start.

My only two complaints about it are that it defaults to Module::Build (but can be configured to use Module::Build::Tiny or ExtUtils::MakeMaker) and the fact that in spite of being v2.3.0 as I write, the author still hasn't removed the EXPERIMENTAL warning from it.

Summary

If you're looking for pure perl minimalism, Minilla or mbtiny are your friend.

If you're looking for cranky, old-school minimalism, then use ExtUtils::MakeMaker and read the docs all the way through before starting.

If you're looking for maximum manipulexity, go learn Dist::Zilla already. If that looks scary, start with Dist::Milla until you need the extra power.

-- mst, out.