| blib/lib/Mango.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 1 | 71 | 1.4 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 57 | 0 | 0 | 0 | /^([^,:]+)(?::(\d+))?/ and push @hosts, $2 ? [$1, $2] : [$1] |
| 120 | 0 | 0 | 0 | $_->{'last'} and not $_->{'start'} |
| 0 | 0 | 0 | $_->{'last'} and not $_->{'start'} and unshift @$queue, $_->{'last'} | |
| 238 | 0 | 0 | 0 | $self->_write($_) and ++$start |
| 248 | 0 | 0 | 0 | not $start and @{$self->{'queue'};} |
| 0 | 0 | 0 | not $start and @{$self->{'queue'};} and @ids < $self->max_connections | |
| 297 | 0 | 0 | 0 | not $loop->is_running and $stream->is_readable |
| line | l | !l | condition |
|---|---|---|---|
| 14 | 0 | 9 | $ENV{'MANGO_DEBUG'} || 0 |
| 57 | 0 | 0 | $_ // '' |
| 64 | 0 | 0 | $url->userinfo // '' |
| 118 | 0 | 0 | delete $self->{'queue'} || [] |
| 136 | 0 | 0 | $hosts ||= [@{$self->hosts;}] |
| 160 | 0 | 0 | $port //= 27017 |
| 205 | 0 | 0 | $_[0]{'id'} // 0 |
| 214 | 0 | 0 | $doc->{'maxWireVersion'} || 0 |
| 224 | 0 | 0 | $doc->{'primary'} // '' |
| 235 | 0 | 0 | $self->{'queue'} ||= [] |
| 307 | 0 | 0 | $self->{'queue'}[-1] || {} |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 39 | 0 | 0 | 0 | $name //= $self->default_db |
| 173 | 0 | 0 | 0 | $c->{'last'} // shift @{$$self{'queue'};} |
| 185 | 0 | 0 | 0 | $err ||= $self->protocol->command_error($doc) |
| 202 | 0 | 0 | 0 | $err || $self->protocol->query_failure($reply) |
| 244 | 0 | 0 | 0 | $op->{'nb'} or grep {not $connections->{$_}{'nb'};} @ids |
| 276 | 0 | 0 | 0 | $self->{'pid'} //= $$ |
| 307 | 0 | 0 | 0 | $last or ($c->{'nb'} xor not +($self->{'queue'}[-1] || {})->{'nb'}) |
| 308 | 0 | 0 | 0 | $last ||= $c->{'nb'} ? shift @{$$self{'queue'};} : pop @{$$self{'queue'};} |
| line | l&&r | l&&!r | !l&&r | !l&&!r | condition |
|---|---|---|---|---|---|
| 307 | 0 | 0 | 0 | 0 | $c->{'nb'} xor not +($self->{'queue'}[-1] || {})->{'nb'} |