/ domm

I hack Perl for fun and profit.

Follow me on twitter!
Atom Icom ... on Atom!
04.09.2012: Vienna.pm September 2012 Techmeet
25.08.2012: Which tag to use for YAPCs?
23.08.2012: Things I learned at YAPC::Europe 2012
09.08.2012: Blio - my blogging "engine"
01.06.2012: App-ArchiveDevelCover 1.001
10.05.2012: Don't use Cache::Memcached for UTF8 strings
19.04.2012: DC-Baltimore Perl Workshop 2012
22.03.2012: Module::ExtractUse 0.25

I wrote Module::ExtractUse ages ago as a component of CPANTS. As you might guess from the name, it extracts use statements. CPANTS uses it to calculate prereqs statically (i.e. without actually running the code). It's implemented as a Parse::RecDescent grammar.

I totally forgot about it for the last four years, until I got several bug reports (and CPAN tester failures). As it turns out, new versions of Parse::RecDescent couldn't handle the precompiled grammar class Module::ExtractUse shipped with. The obvious fix (suggested by various nice & helpful people, see the ticket in RT) was to autogenerate the grammar class during build, using the up-to-date version of Parse::RecDescent on the installing machine.

Now, touching old code is always ... interesting. And touching old CPAN dists (pre-"Dist::Zilla":http://dzil.org/) is downright annoying. So the first thing I did was to convert the dist to Dist::Zilla, generate a new grammar, and ship it (aka version 0.24). The problem was solved .. for a few days, until another new version of Parse::RecDecent was released.

My obvious problem now was that I just deleted my Build.PL, but now needed it again to compile the grammar class during install. Preferably without losing all the dzil goodness. A quick CPAN search resulted in Dist::Zilla::Plugin::ModuleBuild::Custom, which allowed me to do just that (even if the templating syntax takes a while to get used too...).

After solving a few other bugs that were reported in the last weeks (and leaving some year-old bugs for later...) I released 0.25 today. And I do hope that it will now just fucking do it for the next four years.

PS: I'm going to attend and give a talk at the DC-Baltimore Perl Workshop (my first time in the US), and was even promoted to "long-distance member of NY.pm" by Jim Keenan. Yay!

Comments (via disqus)

21.02.2012: App::ArchiveDevelCover 1.000
10.01.2012: App::TimeTracker 2.016