IM::Engine::Plugin::Dispatcher - Path::Dispatcher ♥ IM::Engine
package TimeBot; use Path::Dispatcher::Declarative -base; on qr/date|time/ => sub { localtime }; IM::Engine->new( interface => { protocol => 'REPL', }, plugins => { Dispatcher => { dispatcher => 'TimeBot', }, }, )->run;
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!
Shawn M Moore, sartak@gmail.com
sartak@gmail.com
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.
To install IM::Engine::Plugin::Dispatcher, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IM::Engine::Plugin::Dispatcher
CPAN shell
perl -MCPAN -e shell install IM::Engine::Plugin::Dispatcher
For more information on module installation, please visit the detailed CPAN module installation guide.