Branch Coverage

blib/lib/Telegram/Bot/Brain.pm
Criterion Covered Total %
branch 14 138 10.1


line true false branch
48 0 0 unless $now - $last_check >= $seconds
79 0 0 unless "Mojo::IOLoop"->is_running
100 0 0 unless $args->{'chat_id'}
103 0 0 unless $args->{'text'}
107 0 0 if exists $args->{'parse_mode'}
108 0 0 if exists $args->{'disable_web_page_preview'}
109 0 0 if exists $args->{'disable_notification'}
111 0 0 if exists $args->{'reply_parameters'}
113 0 0 if (exists $args->{'reply_to_message_id'})
119 0 0 if (exists $args->{'reply_markup'})
121 0 0 if ref $reply_markup ne "Telegram::Bot::Object::InlineKeyboardMarkup" and ref $reply_markup ne "Telegram::Bot::Object::ReplyKeyboardMarkup" and ref $reply_markup ne "Telegram::Bot::Object::ReplyKeyboardRemove" and ref $reply_markup ne "Telegram::Bot::Object::ForceReply"
141 0 0 unless $args->{'chat_id'}
144 0 0 unless $args->{'from_chat_id'}
147 0 0 unless $args->{'message_id'}
151 0 0 if exists $args->{'disable_notification'}
165 0 0 unless $args->{'message_id'}
179 0 0 unless $args->{'chat_id'}
181 0 0 unless $args->{'message_id'}
185 0 0 if exists $args->{'text'}
186 0 0 if exists $args->{'parse_mode'}
187 0 0 if exists $args->{'disable_web_page_preview'}
189 0 0 if (exists $args->{'reply_markup'})
191 0 0 if ref $reply_markup ne "Telegram::Bot::Object::InlineKeyboardMarkup" and ref $reply_markup ne "Telegram::Bot::Object::ReplyKeyboardMarkup" and ref $reply_markup ne "Telegram::Bot::Object::ReplyKeyboardRemove" and ref $reply_markup ne "Telegram::Bot::Object::ForceReply"
211 0 0 unless $args->{'chat_id'}
217 0 0 unless $args->{'photo'}
218 0 0 if (-e $args->{'photo'})
235 0 0 unless $args->{'chat_id'}
242 0 0 unless $args->{'document'}
243 0 0 if (-e $args->{'document'}) { }
263 0 0 unless $args->{'inline_query_id'}
266 0 0 unless $args->{'results'}
270 0 0 if exists $args->{'cache_time'}
271 0 0 if exists $args->{'is_personal'}
272 0 0 if exists $args->{'next_offset'}
273 0 0 if exists $args->{'button'}
287 0 0 unless $args->{'commands'}
289 0 0 if ($args->{'language_code'} // "") ne ""
300 0 0 unless $args->{'callback_query_id'}
304 0 0 if exists $args->{'text'}
305 0 0 if exists $args->{'show_alert'}
306 0 0 if exists $args->{'url'}
307 0 0 if exists $args->{'cache_time'}
321 0 0 unless $chat_id
322 0 0 unless $user_id
338 0 0 unless $args->{'chat_id'}
340 0 0 unless $args->{'user_id'}
357 0 0 unless $args->{'chat_id'}
359 0 0 unless $args->{'user_id'}
376 0 0 unless $args->{'chat_id'}
378 0 0 unless $args->{'user_id'}
382 0 0 if exists $args->{'until_date'}
383 0 0 if exists $args->{'revoke_messages'}
397 0 0 unless $args->{'chat_id'}
399 0 0 unless $args->{'user_id'}
403 0 0 if exists $args->{'only_if_banned'}
421 0 0 if $http_active
455 4 2 if $item->{'message'}
456 1 5 if $item->{'edited_message'}
457 0 6 if $item->{'channel_post'}
458 0 6 if $item->{'edited_channel_post'}
459 0 6 if $item->{'inline_query'}
460 0 6 if $item->{'my_chat_member'}
461 0 6 if $item->{'callback_query'}
462 0 6 if $item->{'chat_join_request'}
463 0 6 if $item->{'chat_member'}
464 0 6 if $item->{'my_chat_member'}
470 1 5 unless ($update)
488 0 0 if ($res->is_success) { }
0 0 elsif ($res->is_error) { }