| 1 | package Telegram::Bot::Object::InlineQuery; | ||||||||||||
| 2 | 6 | $Telegram::Bot::Object::InlineQuery::VERSION = '0.029'; | |||||||||||
| 3 | # ABSTRACT: The base class for Telegram 'Invoice' type objects | ||||||||||||
| 4 | |||||||||||||
| 5 | |||||||||||||
| 6 | 6 | ▶ | use Mojo::Base 'Telegram::Bot::Object::Base'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 6 | ▶ | use Mojo::JSON (); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | 6 | ▶ | use Telegram::Bot::Object::Location; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | 6 | ▶ | use Telegram::Bot::Object::User; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 10 | |||||||||||||
| 11 | 6 | has 'id'; | |||||||||||
| 12 | 6 | has 'from'; # User | |||||||||||
| 13 | 6 | has 'query'; | |||||||||||
| 14 | 6 | has 'offset'; | |||||||||||
| 15 | 6 | has 'chat_type'; | |||||||||||
| 16 | 6 | has 'location'; # Location | |||||||||||
| 17 | |||||||||||||
| 18 | 4 | ▶ | sub fields { | ||||||||||
|
Subroutine
fields: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 19 | return { | ||||||||||||
| 20 | 4 | scalar => [qw/id query offset chat_type/], | |||||||||||
| 21 | 'Telegram::Bot::Object::User' => [qw/from/], | ||||||||||||
| 22 | 'Telegram::Bot::Object::Location' => [qw/location/], | ||||||||||||
| 23 | }; | ||||||||||||
| 24 | } | ||||||||||||
| 25 | |||||||||||||
| 26 | |||||||||||||
| 27 | 0 | ▶ | sub reply { | ||||||||||
|
Subroutine
reply: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||
| 28 | 0 | my $self = shift; | |||||||||||
| 29 | 0 | ▶ | my $results = shift // []; | ||||||||||
|
Condition0%0/2
shift() // []
MC/DC0%0/1
shift() // []
shift()
Truth table0%0/2
A
A= shift()
| |||||||||||||
| 30 | 0 | ▶ | my $args = shift // {}; | ||||||||||
|
Condition0%0/2
shift() // {}
MC/DC0%0/1
shift() // {}
shift()
Truth table0%0/2
A
A= shift()
| |||||||||||||
| 31 | |||||||||||||
| 32 | 0 | return $self->_brain->answerInlineQuery( | |||||||||||
| 33 | { | ||||||||||||
| 34 | inline_query_id => $self->id, | ||||||||||||
| 35 | results => Mojo::JSON::to_json($results), | ||||||||||||
| 36 | %$args | ||||||||||||
| 37 | } | ||||||||||||
| 38 | ); | ||||||||||||
| 39 | } | ||||||||||||
| 40 | |||||||||||||
| 41 | 6 | 1; | |||||||||||
| 42 | |||||||||||||
| 43 | __END__ | ||||||||||||