Horris::Connection::Plugin - Base Package of Plugins
version v0.1.2
package Horris::Connection::Plugin::Foo; use Moose; with qw/Horris::Connection::Plugin MooseX::Role::Pluggable::Plugin/; # override member variables if you want. has '+is_enable' => ( default => 0 # $self->is_enable is false ); sub init { # initialize plugin stuff here } sub on_connect { # implement on_connect stuff here } sub on_disconnect { # implement on_disconnect stuff here } sub irc_privmsg { my ($self, $message) = @_; # this hook method will called by Horris::Connection # when 'irc_privmsg' event occur in joinning irc channels # see the AnyEvent::IRC::Client for 'irc_privmsg' more detail # # implement irc_privmsg stuff here } sub on_privatemsg { my ($self, $nick, $message) = @_; # this hook method will called when who send a private message to # your bot. } __PACKAGE__->meta->make_immutable; # see the documentation for MooseX::Role::Pluggable, # MooseX::Role::Pluggable::Plugin for info on how to get your Moose # class to use this plugin...
MooseX::Role::Pluggable MooseX::Role::Pluggable::Plugin Horris::Connection
hshong <hshong@perl.kr>
This software is copyright (c) 2011 by hshong.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Horris, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Horris
CPAN shell
perl -MCPAN -e shell install Horris
For more information on module installation, please visit the detailed CPAN module installation guide.