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:

[@Basic]

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

[@Filter]

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:

[@Filter]
-bundle = @Basic
-remove = MakeMaker

Installing uglyfi-js and node on Ubuntu 12.10

The e-Classifieds ® Corporate edition uses lots of JavaScript code, so to help speed things up we compress the code. Previously this has been done using JavaScript::Minifier::XS from CPAN, but all the cool kids are using UglifyJS. So I thought I would see how it compared.

Read more of this post

Please Stop Including the Kitchen Sink

I needed to install Business::OnlinePayment::WorldPay @ $work today. I had been using the module in my own perlbrew name space so as to not pollute the server with unnecessary modules, but as the code went live I needed to install it server side.

Little did I know that it triggers once of those dependency cascades that includes the kitchen sink.

Read more of this post

Its Stuff Like This, perlblogs

I feel pretty much useless sitting here on WordPress.com trying to add something to the Perl community and not getting any traffic. So I was seriously debating signing up on blogs.perl.org tonight. That didn’t work out too well…

Read more of this post

Dancer v2 is coming

Perl Dancer one of the crop of new Perl web-app frameworks, and one that is related in style to Ruby’s successful Sinatra framework, is announcing the development of Dancer 2.

Read more of this post

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

What does that module do? Task::Kensho.pm

Whenever I look at CPAN I am always amazed at the number of Perl modules that are available. Over 101,000 as of today. It just blows me away that that much time and effort has been put into coding these modules, by all of those people, and for free.

But at the same time I can’t help but think how can anyone possibly find the time to know what they all do? How do you find out what modules are relevant or helpful for your daily programming? More over when you are installing a module and it pulls in other modules don’t you want to know why? Perhaps some of those other modules could be useful to you too.

Read more of this post