Bot::Backbone::Service::Role::Dispatch - Role for services that can perform dispatch
version 0.140590
Any service that can use a dispatcher employ this role to make that happen.
dispatcher default => as { ... }; service some_service => ( service => '=My::Service', dispatcher => 'default', );
During construction, this is named dispatcher. This is the name of the dispatcher to load from the bot during initialization.
dispatcher
my $dispatcher = $service->dispatcher;
Do not set this attribute. It will be loaded using the "dispatcher_name" automatically. It returns a Bot::Bakcbone::Dispatcher object to use for dispatch.
A dispatch_message method is also delegated to the dispatcher.
dispatch_message
$service->dispatch_message($message);
If the service has a dispatcher configured, this will call the "dispatch_message" in Bot::Backbone::Dispatcher method on the dispatcher.
Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
This software is copyright (c) 2014 by Qubling Software LLC.
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 Bot::Backbone, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bot::Backbone
CPAN shell
perl -MCPAN -e shell install Bot::Backbone
For more information on module installation, please visit the detailed CPAN module installation guide.