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

It is always these idiots with massive Data::Dumper struts ….

*laugh*

Just found this in the source for PPI:

175 if ( $self->{source_bytes} > 1048576 ) {
176 # Dammit! It’s ALWAYS the “Perl” modules larger than a
177 # meg that seems to blow up the Tokenizer/Lexer.
178 # Nobody actually writes real programs larger than a meg
179 # Perl::Tidy (the largest) is only 800k.
180 # It is always these idiots with massive Data::Dumper
181 # structs or huge RecDescent parser.
182 PPI::Exception::ParserRejection->throw(“File is too large”);

PPI/Tokenizer.pm

Yeah. It’s your fault! :-)

Not actually sure why trying to use Test::Perl::Critic::Progressive results in this since I don’t have any files that are that big, but it made me laugh when I discovered the source of the message.

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

Strong Growth in Perl Jobs market

According to eWeek the number of Perl jobs grew by 26% since 2009.

Read more of this post