Branch Coverage

blib/lib/Bot/Telegram.pm
Criterion Covered Total %
branch 49 50 98.0


line true false branch
74 1 1 unless exists $args{'token'}
86 1 99 unless $self->api
105 2 2 !$tx->error && ref $response && $response->{'ok'} ? :
144 26 12 if $update->{'update_id'} >= $self->polling_config->{'offset'}
158 15 23 if ($type) { }
169 3 35 if $@
193 1 3 if $self->is_polling
197 1 2 unless ref $config
201 0 2 ref $cb eq 'CODE' ? :
215 2 24 if (ref $_[0] eq "HASH")
222 4 22 if ($opts{'restart'}) { }
225 1 21 if $self->is_polling
240 2 22 unless $self->is_polling
246 4 18 unless $agent->isa("Mojo::UserAgent") and $self->is_async
253 8 10 if $self->_polling_timer
279 21 8 if ($async) { }
284 9 12 if ($error = $tx->error || !$response->{'ok'})
286 3 6 if $response->{'error_code'}
287 3 3 if $tx->error
296 4 4 if ($error)
306 1 28 if (exists $response->{'parameters'}{'retry_after'})
313 16 13 unless ($error)
323 6 23 unless $self->is_polling
326 19 4 if ($async) { }
350 34 8 if ($self->is_async) { }