Branch Coverage

blib/lib/IO/Async/Timer/Periodic.pm
Criterion Covered Total %
branch 34 42 80.9


line true false branch
128 5 28 if (exists $params{'on_tick'})
130 0 5 unless ref $on_tick
136 25 8 if (exists $params{'interval'})
137 1 24 if $self->is_running
140 0 24 unless $interval > 0
145 1 31 if (exists $params{'first_interval'})
146 0 1 if $self->is_running
149 0 1 unless $first_interval >= 0
154 2 30 if (exists $params{'reschedule'})
156 0 2 unless grep {$_ eq $resched;} "hard", "skip", "drift"
162 0 32 unless ($self->can_event("on_tick"))
177 1 43 $self->{'is_first'} && defined $self->{'first_interval'} ? :
180 17 27 if (not defined $self->{'next_time'}) { }
23 4 elsif ($resched eq 'hard') { }
2 2 elsif ($resched eq 'skip') { }
2 0 elsif ($resched eq 'drift') { }
208 17 23 if ($self->loop) { }
229 0 28 unless my $self = shift()
233 2 26 unless my $ok = eval { do { $self->invoke_event("on_tick"); 1 } }
237 27 1 if defined $self->{'next_time'}
239 2 26 if not $ok