File Coverage

blib/lib/App/TeleGramma/BotAction/ListenAll.pm
Criterion Covered Total %
statement 6 10 60.0
branch n/a
condition n/a
subroutine 2 4 50.0
pod 0 2 0.0
total 8 16 50.0


line stmt bran cond sub pod time code
1             package App::TeleGramma::BotAction::ListenAll;
2             $App::TeleGramma::BotAction::ListenAll::VERSION = '0.12';
3             # ABSTRACT: Base class for bot actions that listen to all messages, indiscriminately
4              
5 2     2   11 use Mojo::Base 'App::TeleGramma::BotAction';
  2         4  
  2         14  
6 2     2   267 use App::TeleGramma::Constants qw/:const/;
  2         5  
  2         286  
7              
8             has 'response';
9              
10 0     0 0   sub can_listen { 1 }
11              
12             sub process_message {
13 0     0 0   my $self = shift;
14 0           my $msg = shift;
15              
16 0           return $self->response->($msg);
17             }
18              
19             1;
20              
21             __END__
22              
23             =pod
24              
25             =encoding UTF-8
26              
27             =head1 NAME
28              
29             App::TeleGramma::BotAction::ListenAll - Base class for bot actions that listen to all messages, indiscriminately
30              
31             =head1 VERSION
32              
33             version 0.12
34              
35             =head1 AUTHOR
36              
37             Justin Hawkins <justin@eatmorecode.com>
38              
39             =head1 COPYRIGHT AND LICENSE
40              
41             This software is copyright (c) 2017 by Justin Hawkins <justin@eatmorecode.com>.
42              
43             This is free software; you can redistribute it and/or modify it under
44             the same terms as the Perl 5 programming language system itself.
45              
46             =cut