The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

POEx::ZMQ::Types - Type::Tiny types for use with POEx::ZMQ

SYNOPSIS

  use POEx::ZMQ;
  use POEx::ZMQ::Types -types;
  use Moo;

  has zmq_ctx => (
    is      => 'ro',
    isa     => ZMQContext,
    builder => sub { POEx::ZMQ->context },
  );

  has zmq_pub => (
    lazy    => 1,
    is      => 'ro',
    isa     => ZMQSocket[ZMQ_PUB],
    builder => sub {
      my ($self) = @_;
      POEx::ZMQ->socket(context => $self->zmq_ctx, type => ZMQ_PUB)
    },
  );

DESCRIPTION

Type::Tiny-based types for POEx::ZMQ.

ZMQContext

A POEx::ZMQ::FFI::Context object.

ZMQEndpoint

A string that looks like a properly-formed ZeroMQ endpoint using a known transport.

ZMQSocket

A POEx::ZMQ::Socket object.

ZMQSocket[`a]

A "ZMQSocket" can be parameterized with a given "ZMQSocketType".

ZMQSocketBackend

A POEx::ZMQ::FFI::Socket object.

ZMQSocketType

A ZMQ socket type constant, such as those exported by POEx::ZMQ::Constants.

Can be coerced from a string.

AUTHOR

Jon Portnoy <avenj@cobaltirc.org>