NAME

BeamX::Peer::Listener

VERSION

version 0.003

SYNOPSIS

  # optional peer
  %args = ( peer => $peer );
  $emitter->subscribe( $event_name, $subref, %args );

DESCRIPTION

This is the default Listener object created by the BeamX::Emitter::subscribe method when a callback subscription is registered. It sub-classes Beam::Listener.

ATTRIBUTES

peer

An optional reference to a peer object, allowing the emitter to send it an event directly using BeamX::Emitter::send. The object must consume the BeamX::Emitter role.

METHODS

has_peer

  $bool = $self->has_peer();

This returns true if the object's peer attribute has been set

AUTHOR

Diab Jerius <djerius@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2016 by the Smithsonian Astrophysical Observatory.

This is free software, licensed under:

  The GNU General Public License, Version 3, June 2007