NAME
Bot::Backbone::Service::Role::Dispatch - Role for services that can perform dispatch
VERSION
version 0.112400
DESCRIPTION
Any service that can use a dispatcher employ this role to make that happen.
ATTRIBUTES
dispatcher_name
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.
METHODS
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.
AUTHOR
Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 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.