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.14';
3             # ABSTRACT: Base class for bot actions that listen to all messages, indiscriminately
4              
5 2     2   12 use Mojo::Base 'App::TeleGramma::BotAction';
  2         4  
  2         11  
6 2     2   246 use App::TeleGramma::Constants qw/:const/;
  2         3  
  2         314  
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.14
34              
35             =head1 AUTHOR
36              
37             Justin Hawkins <justin@hawkins.id.au>
38              
39             =head1 COPYRIGHT AND LICENSE
40              
41             This software is copyright (c) 2019 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