NAME
IM::Engine::Plugin::Dispatcher - Path::Dispatcher ♥ IM::Engine
SYNOPSIS
package TimeBot;
use Path::Dispatcher::Declarative -base;
on qr/date|time/ => sub { localtime };
IM::Engine->new(
interface => {
protocol => 'REPL',
},
plugins => {
Dispatcher => {
dispatcher => 'TimeBot',
},
},
)->run;
DESCRIPTION
Path::Dispatcher is a pretty good way of running some code based on some string input. My personal use case for Path::Dispatcher was for IM or IRC bots, so this is me eating my own dog food.
This module is meant to be extended to improve Path::Dispatcher + IM::Engine goodness. For example, the IM::Engine::Plugin::Dispatcher::404 plugin extends your dispatcher with a 404 (command not found) error.
It is currently alpha quality with serious features missing and is rife with horrible bugs. I'm releasing it under the "release early, release often" doctrine. Backwards compatibility may be broken in subsequent releases. Or by IM::Engine releases!
AUTHOR
Shawn M Moore, sartak@gmail.com
SEE ALSO
COPYRIGHT AND LICENSE
Copyright 2009 Shawn M Moore.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.