NAME
Reflex::POE::Session - Observe events from a POE::Session object.
VERSION
version 0.004
SYNOPSIS
# Not a complete example. # Please see eg-13-irc-bot.pl in the examples for one.
has poco_watcher => (
isa => 'Reflex::POE::Session',
is => 'rw',
traits => ['Reflex::Trait::Observer'],
role => 'poco',
);
sub BUILD {
my $self = shift;
$self->component(
POE::Component::IRC->spawn(
nick => "reflex_$$",
ircname => "Reflex Test Bot",
server => "10.0.0.25",
) || die "Drat: $!"
);
$self->poco_watcher(
Reflex::POE::Session->new(
sid => $self->component()->session_id(),
)
);
$self->run_within_session(
sub {
$self->component()->yield(register => "all");
$self->component()->yield(connect => {});
}
)
}
TODO - Either complete the example, or find a shorter one.
DESCRIPTION
Reflex::POE::Session allows a Reflex::Object to receive events from a specific POE::Session instance, identified by the session's ID. In the future it may also limit the events it sees to allow better performance.
TODO - Complete the documentation.
GETTING HELP
ACKNOWLEDGEMENTS
SEE ALSO
Reflex and "SEE ALSO" in Reflex
BUGS
CORE AUTHORS
OTHER CONTRIBUTORS
"OTHER CONTRIBUTORS" in Reflex