Branch Coverage

blib/lib/Telegram/Bot/Brain.pm
Criterion Covered Total %
branch 8 56 14.2


line true false branch
43 0 0 unless $now - $last_check >= $seconds
74 0 0 unless "Mojo::IOLoop"->is_running
95 0 0 unless $args->{'chat_id'}
98 0 0 unless $args->{'text'}
102 0 0 if exists $args->{'parse_mode'}
103 0 0 if exists $args->{'disable_web_page_preview'}
104 0 0 if exists $args->{'disable_notification'}
105 0 0 if exists $args->{'reply_to_message_id'}
108 0 0 if (exists $args->{'reply_markup'})
110 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"
130 0 0 unless $args->{'chat_id'}
133 0 0 unless $args->{'from_chat_id'}
136 0 0 unless $args->{'message_id'}
140 0 0 if exists $args->{'disable_notification'}
155 0 0 unless $args->{'chat_id'}
162 0 0 unless $args->{'photo'}
163 0 0 if (-e $args->{'photo'}) { }
183 0 0 unless $args->{'chat_id'}
190 0 0 unless $args->{'document'}
191 0 0 if (-e $args->{'document'}) { }
215 0 0 if $http_active
249 4 2 if $item->{'message'}
250 1 5 if $item->{'edited_message'}
251 0 6 if $item->{'channel_post'}
252 0 6 if $item->{'edited_channel_post'}
256 1 5 unless ($update)
274 0 0 if ($res->is_success) { }
0 0 elsif ($res->is_error) { }