Dist::Zilla and custom Makefiles

I’m trying to configure a module to release to CPAN, the repository for the Perl programming language (hi Tiobe). In trying to be up to date about things I asked on reddit what would be a good build tool to use. The majority of votes were for Dist::Zilla, so I thought I’d look into it.

It seems relatively simple for most modules, but my module uses XS and needs to link to libssl. To do this I needed to pass INC and LIB params in the Makefile.PL, but you can’t do that with Dist::Zilla‘s default Makefile plugin.

There are some options for having custom Makefile.PL‘s. I tried MakeMaker::Custom, but that required an entire Makefile.PL template just for 2 extra lines. Instead I opted for MakeMaker::Awesome, but that requires a module to be placed in “inc”…

Still, in both cases there is one minor issue that took a little while to solve, conflicting builds of Makefile.Pl by MakeMaker and MakeMaker::Custom. This is answered in the documentation, but only when you know what to look for.

Essentially the issue is this. You are probably going to have dist.ini include:


The @ indicates a plugin bundle, thus it loads Dist::Zilla::PluginBundle::Basic. That loads [MakeMaker] and that conflicts with [MakeMaker::*].

The solution to handling this is the plugin bundle


This is a fake bundle which wraps around another plugin bundle and removes from it any plugins that you don’t want to load. Thus you can still load @Basic, but not load MakeMaker simply by adding this:

-bundle = @Basic
-remove = MakeMaker

What does that module do? aliased.pm

In my first post in this series I explained how Task::Kensho provided a nice list of modules to install to give a good basis for many common actions.

When installing some of those modules I had one of those “I wonder what that does” moments when cpanm showed that it was installing “aliased.pm”. Generally all lower case module names are reserved for pragmas and modules that provide pragma like support, so I was curious to know what this module did.

Read more of this post