[zeromq-dev] question about working with 0mq using perl on EL6 ?

Dylan Cali calid1984 at gmail.com
Tue Apr 5 16:38:37 CEST 2016

On Mon, Apr 4, 2016 at 6:14 PM, Bond Masuda <bond.masuda at hexadiam.com> wrote:
> Is there an easier way to get an environment on EL6 ready for 0mq and
> Perl? Or should I just use the low level perl-ZMQ-LibZMQ3 wrapper library?

If you want to use ZMQ::FFI the easiest way is to use cpan/cpanm,
which is the package manager for perl.  Just as you would use gem for
ruby, pip for python, nuget for .net, maven/gradle for the jvm, you
really want to use the package manager for the language you are
targeting, which in this case is Perl... it will ensure the least
amount of headaches.

It's really quite easy to bootstrap, and all the production Perl stuff
I've done on EL6 was installed/deployed using cpanm.  You can find
bootstrap instructions here:

The perl modules available as rpms are generally for the perl scripts
and tools used by the core system, custom stuff should be installed to
a local::lib if possible.  The reason is you don't want to
pollute/break the system perl scripts by installing unsupported module

So, options:

1.  Install cpanm and use it to install ZMQ::FFI into the system Perl.
Pros:  very easy to do and scriptable so users in theory don't have to
do these steps themselves (although there really aren't that many).
Cons:  Potential module version conflicts and system breakage.

2.  Install cpanm and local::lib, and install ZMQ::FFI into the
local::lib.  Pros:  Doesn't pollute the system perl, still pretty easy
to bootstrap.  Cons:  You're still using the ancient version of Perl
that comes with EL6, and users will have to add local::lib environment
setup to their shell rc.

3.  Use perlbrew (http://perlbrew.pl) to install a separate, modern
perl and install ZMQ::FFI, etc there (this is what I've done on my own
production systems).  Then use that perl for your application.  Pros:
This is really the most robust way to manage Perl installations and
deployments.  Cons: More involved bootstrap and setup, hard as an
out-of-box solution for a client.

4. Just use ZMQ::LibZMQ3.  Pros:  Easiest out-of-box setup.  Cons:  Is
less actively maintained and doesn't have a lot of modern zeromq
functionality, the XS API is hardcoded to that version of zeromq, so
you'll have to port some of your code if you switch zeromq
versions/api (and there may not even be an XS API available for the
newer libzmq apis...).

So no perfect solution unfortunately, just options with tradeoffs.

It may also be worth exploring getting an official rpm for ZMQ::FFI
added to the EPEL repos.

Hope that helps!

More information about the zeromq-dev mailing list