Branch Coverage

blib/lib/Mojo/Reactor/Poll.pm
Criterion Covered Total %
branch 43 46 93.4


line true false branch
12 1 12383 unless my $timer = $self->{'timers'}{$id}
13 2934 9449 if defined $after
36 1482 48570 unless $self->{'running'}
43 10 50042 unless keys %{$$self{"timers"};} or keys %{$$self{"io"};}
47 50041 1 defined $min ? :
48 28062 21980 $timeout <= 0 ? :
51 23957 26085 if (keys %{$$self{'io'};}) { }
18 26067 elsif ($timeout) { }
55 22914 1043 if (IO::Poll::_poll($timeout, @poll) > 0)
58 18928 36892 if ($mode & 59)
59 2 18926 unless my $io = $self->{'io'}{$fd}
60 18926 0 if ++$i
62 46189 9629 unless $mode & 4 and my $io = $self->{'io'}{$fd}
63 9629 0 if ++$i
74 1 98035 unless my $t = $self->{'timers'}{$id}
75 69829 28206 unless $t->{'time'} <= $now
78 26869 1337 if ($t->{'recurring'}) { }
83 28206 0 if $t->{'cb'}
92 2381 911 unless ref $remove
111 1 11355 unless my $io = $self->{'io'}{fileno $handle}
113 11152 203 if $read
114 8714 2641 if $write
141 3 56758 unless eval { do { $self->$cb(@_); 1 } }