Backbone/Service/Role/Responder.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 20 CC 1 SCAR 6.9
CC
1
Cov
0%
send_reply
2.0
send_message
2.0
BEGIN
2.0
CRAP 2.0
1 package Bot::Backbone::Service::Role::Responder;
2 $Bot::Backbone::Service::Role::Responder::VERSION = '0.161950';
3 use v5.10;
4 use Moose::Role;
5  
6 # ABSTRACT: A role for services that respond to messages
7  
8  
9 sub send_reply {
10 my ($self, $message, $options) = @_;
11  
12 $self->send_message({
13 chat => $message->chat,
14 group => $message->group,
15 to => $message->from->username,
16 %$options,
17 });
18 }
19  
20  
21 sub send_message {
22 my ($self, $options) = @_;
23  
24 my $chat = delete $options->{chat};
25  
26 $chat->send_message($options);
27 }
28  
29 1;
30  
31 __END__