Skip to content

torcolvin/p5-ZMQ

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

OVERVIEW

This repository contains various modules for the libzmq Perl binding

INDEX

TRAVIS CI

Build Status

MODULES IN THIS REPOSITORY

Note that released versions for any of these modules can be downloaded via cpan/cpanm.

cpan command comes with Perl itself, but we recommend cpanm. If you don't have cpanm installed. Please see the README at https://github.com/miyagawa/cpanminus for details on how to install cpanm

With cpanm, you can install the ZMQ perl bindings like so:

cpanm ZMQ::LibZMQ2

Check for what's available on CPAN from the following links:

If the particular version you're looking for isn't up on CPAN, you need to build/install them yourself from this repository. See the listing below for details.

Note that you need Module::Install and several other plugins. Each module's Makefile.PL should warn you, but since this would be a "for developers" version, it is ultimately your responsibility to check for the environment.

ZMQ-Constants

Lists the constants used in libzmq.

Pure Perl, required by all other modules.

perl Makefile.PL
make
make test
make install

ZMQ-LibZMQ2

Binding to the libzmq (2.x) library.

Requires a C compiler, and libzmq 2.1.x.

If you have pkg-config, libzmq should be automatically detected:

perl Makefile.PL
make
make test
make install

If you don't have pkg-config, or if you're installing against a manually installed libzmq:

ZMQ_HOME=/path/to/libzmq perl Makefile.PL
make
make test
make install

If you have multiple libzmq's installed and for some reason this module finds the wrong libzmq, you might need to tweak the generated Makefile. See CAVEATS for details.

ZMQ-LibZMQ3

Binding to the libzmq (3.x) library

Requires a C compiler, and libzmq 3.1.x.

If you have pkg-config, libzmq should be automatically detected:

perl Makefile.PL
make
make test
make install

If you don't have pkg-config, or if you're installing against a manually installed libzmq:

ZMQ_HOME=/path/to/libzmq perl Makefile.PL
make
make test
make install

If you have multiple libzmq's installed and for some reason this module finds the wrong libzmq, you might need to tweak the generated Makefile. See CAVEATS for details.

ZMQ

Perl-ish libzmq wrapper. Use ZMQ::LibZMQ2 and ZMQ::LibZMQ3 for direct one-to-one mapping for zmq functions.

The author recommends that you use ZMQ::LibZMQ[23] for most use cases -- ZMQ.pm tries to be "nice", but isn't exactly free from things like API changes between libzmq2 <-> libzmq3.

For example, with ZMQ.pm you need to be conscious about using recv and/or recvmsg. This would be problematic for "portable" code... so the only sane suggestion is to use ZMQ.pm only for one off scripts, and for other purposes explicitly specify the libzmq version you're using via an explicit "use ZMQ::LibZMQ[23]"

Pure Perl, but requires either ZMQ::LibZMQ2 or ZMQ::LibZMQ3.

perl Makefile.PL
make
make test
make install

ZMQ-LibCZMQ1

Binding to the high-level C API library czmq (http://czmq.zeromq.org). Highly experimental. Your help/contribution is much appreciated.

Requires a C compiler.

If you have pkg-config, czmq should be automatically detected:

perl Makefile.PL
make
make test
make install

If you don't have pkg-config, or if you're installing against a manually installed libczmq:

CZMQ_HOME=/path/to/czmq perl Makefile.PL
make
make test
make install

If you have multiple libzmq's installed and for some reason this module finds the wrong libzmq, you might need to tweak the generated Makefile. See CAVEATS for details.

ZMQ-CZMQ

Perl-ish libczmq wrapper. Uses ZMQ::LibCZMQ1 internally.

CAVEATS

Tweaking the Makefile

I've seen cases where generated Makefile contains something like:

LDDLFLAGS = .... -L/usr/local/lib
(snip)
EXTRALIBS = -L/path/to/other-zmq -lzmq
LDLOADLIBS = -L/path/to/other-zmq -lzmq

What happens is that LDDLFLAGS is used BEFORE the other variables, and many compilers searches for libraries in that order, so if you have old libzmq in /usr/local/lib, then we might find that one first.

What you can do is first remove the -L/usr/local/lib, and see if that works. If that fails, you might want to try moving -L/usr/local/lib from LDDLFLAGS and append it to EXTRALIBS and LDLOADLIBS.

These details vary greatly depending on your system, so if this doesn't work and you must file an issue, make sure to put as much as detail as possible.

About

libzmq Perl binding

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Perl 97.0%
  • C 2.9%
  • Shell 0.1%