Announcing Digest::MurmurHash2::Neutral

This week I released Digest::MurmurHash2::Neutral.

There are already perl modules of both MurmurHash and MurmurHash3, but we needed a MurmurHash2 implementation to be able to work with the nginx split_clients interface.

This was the first time I wrote a module using XS. For those who do not know, XS is Perl’s variant on an FFI. Unlike modern FFIs, instead of exploiting C calling conventions, you instead integrate the external code into Perl (XS is almost simply Perl’s own implementation.) This was a simple module and there were other similar modules that I could start from, so this was pretty easy.

I expected the building and releasing of it to be hard, because I knew that Dist::Zilla had some kind of work done to make it better for XS, but I used it exactly like I always do.

I test my code on TravisCI and for the first time really needed to build the module before testing it. The latest version of Graham Knop’s Perl travis-helpers has excellent tooling for this. It will even build your module with a newer Perl (since releasing your code from 5.8 is an exercize in futility) and then test against an older one. Pretty great!

All in all, as usual, releasing code to CPAN continues to be easy, fun, and effective.

Posted Fri, Sep 23, 2016

If you're interested in being notified when new posts are published, you can subscribe here; you'll get an email once a week at the most.