Branch Coverage

blib/lib/AnyEvent/ConnPool.pm
Criterion Covered Total %
branch 37 54 68.5


line true false branch
96 0 5 unless ($opts{'constructor'})
100 0 5 if (ref $opts{'constructor'} ne 'CODE')
104 0 5 if ($opts{'dispatcher'} and not $opts{'init'})
110 1 4 if ($opts{'check'})
111 0 1 if (ref $opts{'check'} ne 'HASH')
114 0 1 unless ($opts{'check'}{'cb'})
118 0 1 if (ref $opts{'check'}{'cb'} ne 'CODE')
121 0 1 unless ($opts{'check'}{'interval'})
129 5 0 if ($opts{'size'})
137 4 1 if ($opts{'init'})
141 0 5 if ($opts{'dispatcher'})
157 0 5 if ($$self{'init'})
163 0 5 unless ($conn_count)
171 1 4 if ($$self{'check'})
182 0 3 unless (eval { do { $$self{'check'}{'cb'}($conn); 1 } })
233 3 0 if ($p1)
236 1 2 if (not ref $p1) { }
1 1 elsif (ref $p1 eq 'AnyEvent::ConnPool') { }
248 0 3 if (not $dispatcher or ref $dispatcher ne 'AnyEvent::ConnPool::Dispatcher')
288 3 64 if (defined $index)
292 2 62 if ($$self{'index'} + 1 > $$self{'count'})
298 15 49 if ($retval->locked) { }
306 0 64 if (wantarray) { }
349 15 29 unless ($conn->locked)
367 14 1 if ($index == 0 or $index >= $count)
378 0 26 if (defined $position) { }
526 1 0 if ($$self{'_constructor'})