Branch Coverage

blib/lib/Mojo/IOLoop.pm
Criterion Covered Total %
branch 39 44 88.6


line true false branch
35 158 147 unless ref $acceptor
77 1 1256 if $self->is_running
86 283 159 if ($c and my $stream = $c->{'stream'})
94 1 3 if ($options->{'freeze'}) { }
115 1 193 if (my $max = $self->max_accepts)
117 1 0 if ($self->{'accepts'} -= 1) <= 0
121 3 191 if $self->_limit
133 3 998 if $self->is_running
141 1 2 if ++$self->{'stop'} and not $self->emit("finish")->_in
146 1 7123 if ref $stream
153 0 0 @_ ? :
167 15769 817 ref $_[0] ? :
169 3 451 $_[0]{'stop'} ? :
173 338 258 if $self->{'accepting'} or $self->_limit
180 63 200 unless delete $self->{'accepting'}
191 0 500 unless my $reactor = $self->reactor
192 25 475 if $reactor->remove($id)
195 110 365 if delete $self->{'acceptors'}{$id}
198 24 171 unless delete $self->{'in'}{$id} or delete $self->{'out'}{$id}
199 2 339 if $self->{'stop'} and not $self->_in
208 194 192 $server ? :
211 338 0 if $self