NAME
Infobot::Plugin::Conduit::Base - Base class for conduits
OVERVIEW
A conduit is a pathway through which messages can be sent to and retrieved from the Infobot. For example, the IRC conduit connects to an IRC network, and optionally a channel, and sits receiving and responding to commands. The Tk conduit creates a graphical window on your computer in to which you can issue commands.
More specifically, a conduit is a class that injects Infobot::Message objects in to the Infobot::Pipeline, and provides a say()
method to receive the replies.
Most real world conduits will use the POE event loop to poll their data sources. There's no restriction on the number of different conduits an Infobot instance can have - your Infobot could connect to IRC and have a Tk interface, and make use of any other available interfaces.
This module provides a base-class for writing your own conduits. You can find a tutorial on creating your own conduit at "how_to_write_a_conduit.pm" in docs.
METHODS
set_name
As with Infobot::Base
, but explicitly sets category to conduit
.
pipeline
Helper method around calling $self-
stash('pipeline')->process( $message );>
say
Virtual method. Should accept a copy of the original Message object, and a string containing the suggested reply.
SEE ALSO
The included tutorial on writing your own conduit