Recent work on ZMQ::LibZMQ3 and CZMQ

During the last leg of my new year's vacation, I started hacking on ZMQ::LibZMQ3 et al again, due to gentle prodding from @melo to include zmq_proxy().

What seemed like a simple API addition in the end turned into myself writing a autoconf like "compile, see if it works, and check if a particular API exists" type of too (is there a CPAN build tool change component that does this kind of stuff?). I'm satisfied by the fact that it actually works, but I must say the Makefile.PL for ZMQ::LibZMQ3 is starting to get pretty darn wacky.

Then I had massive amounts of fun debugging its behavior on Travis CI, which at the moment had this pesky bug where your build logs don't come out until the entire run is done -- and when you have a matrix of 4 perl versions and 6 different components to test under a single run, it means you need to wait for like 20 minutes or so to look at them logs, even though you know from the beginning the run failed because you see a red light in there.

But anyway, so I've done it, I fixed a bunch of problems, added new, missing API. Check out the list of stuff that I added in the Changes file

While on that streak, ZMQ::CZMQ was split into its sugar layer and ZMQ::LibCZMQ1, which is the actual binding. I believe you had to be extremely lucky to have the old CZMQ perl binding to build, but now it should build.

Should you encounter any problems, please report at Github Issues. Otherwise, enjoy!

7 Comments

Devel::CheckLib accepts a 'function' parameter which can be used to test the library interface.

pkgconfig works very well for probing module versions and giving you compile/link flags in most instances - see ExtUtils::PkgConfig

Thank you thank you. I'm a big fan of 0MQ, and am very happy I can get to it from Perl!

zmq_proxy() now indeed works, thanks a lot!

Leave a comment

About lestrrat

user-pic Japan Perl Association director; Livedoor, Inc; Tokyo, Japan