NAME

ZMQ::LibZMQ3::LibZMQ2 - Seamlessly Run LibZMQ Progs against LibZMQ3

SYNOPSIS

This provides an interface compatible with ZMQ::LibZMQ2, but runs against ZMQ::LibZMQ3. For more information and documentation, see ZMQ::LibZMQ2

To port, assuming no fully qualified namespace calls, change

#use ZMQ::LibZMQ2;

to

use ZMQ::LibZMQ3::LibZMQ2;

Porting Implementation and Caveats

There are a few specific issues that come up when porting LibZMQ2 applications to LibZMQ3. This module attempts to provide a basic wrapper, preventing those most common issues from surfacing. This is not intended for new development, but for cases where existing code uses ZMQ::LibZMQ2 and you need to deploy against LibZMQ3.

The primary cases covered are:

renamed methods

For example, zmq_recv becomes zmq_recvmsg.

different return value semantics

For example, zmq_sendmsg returning positive ints on success on 3.x while zmq_send returns 0 on success in libzmq2

poll argument semantics

The argument is now in miliseconds rather than microseconds, so without wrapping this, applications poll for 1000 times as long.

There are, however, a very few specific cases not covered by the porting layer. For the most part these are internal details that programs hopefully avoid caring about but they were found during the test cases copied from ZMQ::LibZMQ2.

These include:

object class names

Objects are blessed in the LibZMQ3 namespace instead of the LibZMQ2 namespace. For example, a socket is blessed as ZMQ::LibZMQ3::Socket rather than ZMQ::LibZMQ2::Socket.

object internals

Object reference semantics are not guaranteed to be useful across implementations. For example, sockets were blessed scalar references in LibZMQ2, but they are not in LibZMQ3.

The above caveats are fairly minor, and are expected not to affect most applications.

EXPORT

zmq_errno
zmq_strerror
zmq_init
zmq_socket
zmq_bind
zmq_connect
zmq_close
zmq_getsockopt
zmq_setsockopt
zmq_send
zmq_recv
zmq_msg_init
zmq_msg_init_data
zmq_msg_init_size
zmq_msg_copy
zmq_msg_move
zmq_msg_close
zmq_msg_poll
zmq_version
zmq_device
zmq_getsockopt_int
zmq_getsockopt_int64
zmq_getsockopt_string
zmq_getsockopt_uint64
zmq_setsockopt_int
zmq_setsockopt_int64
zmq_setsockopt_string
zmq_setsockopt_uint64

AUTHOR

Binary.com, <perl at binary.com>

BUGS

Please report any bugs or feature requests to bug-zmq-libzmq2-libzmq3 at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ZMQ-LibZMQ2-LibZMQ3. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc ZMQ::LibZMQ2::LibZMQ3

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2014 Binary.com.

This code is released under the Apache License version 2. Please see the included LICENSE file.

The Test Suite is copied from ZMQ::LibZMQ, is copyright Daisuke Maki <daisuke@endeworks.jp> and Steffen Mueller, <smueller@cpan.org>.

It is released uner the same terms as Perl itself.