Branch Coverage

blib/lib/Mojo/IOLoop.pm
Criterion Covered Total %
branch 40 44 90.9


line true false branch
35 160 149 unless ref $acceptor
77 1 1268 if $self->is_running
86 286 160 if ($c and my $stream = $c->{'stream'})
94 1 3 if ($options->{'freeze'}) { }
115 1 192 if (my $max = $self->max_accepts)
117 1 0 if ($self->{'accepts'} -= 1) <= 0
121 3 190 if $self->_limit
133 3 1010 if $self->is_running
141 2 1 if ++$self->{'stop'} and not $self->emit("finish")->_in
146 1 7208 if ref $stream
153 0 0 @_ ? :
167 15968 817 ref $_[0] ? :
169 1 454 $_[0]{'stop'} ? :
173 339 262 if $self->{'accepting'} or $self->_limit
180 64 203 unless delete $self->{'accepting'}
191 0 502 unless my $reactor = $self->reactor
192 25 477 if $reactor->remove($id)
195 112 365 if delete $self->{'acceptors'}{$id}
198 23 172 unless delete $self->{'in'}{$id} or delete $self->{'out'}{$id}
199 2 340 if $self->{'stop'} and not $self->_in
208 193 193 $server ? :
211 339 4 if $self