Hyungsuk Hong > Hubot-0.2.4 > Hubot::TextListener

Download:
Hubot-0.2.4.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.2.4   Source   Latest Release: Hubot-0.2.6

NAME ^

Hubot::TextListener - text Listener for hubot

SYNOPSIS ^

    use Hubot::TextListener;
    Hubot::TextListener->new(
        robot => $robot,    # $robot is Hubot::Robot
        regex => qr/hi/,
        callback => sub {
            my $msg = shift;    # $msg is Hubot::Response
            $msg->reply('hi');
        }
    );

DESCRIPTION ^

try to match Hubot::TextMessage then execute callback with matching result and input messages.

SEE ALSO ^

<Hubot::TextMessage>

AUTHOR ^

Hyungsuk Hong <hshong@perl.kr>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2012 by Hyungsuk Hong.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: