Bot/Object/CallbackQuery.pm

filter: Statementstmt 70.0% 21 / 30 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 44.4% 4 / 9 Podpod 20.0% 1 / 5 totaltotal 59.0% 26 / 44 CC 1 SCAR 3.7
CC
1
Cov
70%
fields
2.0
answer
2.0
reply
2.0
CRAP 1.4
« Bot/Object/Audio.pm ↑ Summary Bot/Object/ChatMemberUpdated.pm »
1 package Telegram::Bot::Object::CallbackQuery;
2 2 $Telegram::Bot::Object::CallbackQuery::VERSION = '0.029';
3 # ABSTRACT: The base class for the Telegram type "CallbackQuery".
4  
5  
6 2 ▶use Mojo::Base 'Telegram::Bot::Object::Base';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use Telegram::Bot::Object::User;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use Telegram::Bot::Object::Message;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 # basic message stuff
14 2 has 'id'; # String
15 2 has 'from'; # User
16 2 has 'message'; # Message
17  
18 2 has 'inline_message_id'; # String
19 2 has 'chat_instance'; # String
20 2 has 'data'; # String
21  
22 2 has 'game_short_name'; # String
23  
24 0 ▶sub fields {
Subroutine fields: not called CC=1 SCAR=6.9
Pod undocumented
25 return {
26 0 'scalar' => [qw/id inline_message_id chat_instance data game_short_name/],
27 'Telegram::Bot::Object::User' => [qw/from/],
28  
29 'Telegram::Bot::Object::Message' => [qw/message/],
30 };
31 }
32  
33 0 ▶sub arrays {
Subroutine arrays: not called CC=1 SCAR=0.0
Pod documented
34 }
35  
36  
37 0 ▶sub answer {
Subroutine answer: not called CC=1 SCAR=6.9
Pod undocumented
38 0 my $self = shift;
39 0 my $text = shift;
40 0 return $self->_brain->answerCallbackQuery({callback_query_id => $self->id, text => $text, cache_time => 3600});
41 }
42  
43 0 ▶sub reply {
Subroutine reply: not called CC=1 SCAR=6.9
Pod undocumented
44 0 my $self = shift;
45 0 my $text = shift;
46 0 return $self->message->reply($text);
47 }
48  
49 0 ▶sub chat {
Subroutine chat: not called CC=1 SCAR=6.9
Pod undocumented
50 0 my $self = shift;
51 0 return $self->message->chat;
52 }
53  
54 2 1;
55  
56 __END__
« Bot/Object/Audio.pm ↑ Summary Bot/Object/ChatMemberUpdated.pm »