Branch Coverage

blib/lib/Mojo/Redis2.pm
Criterion Covered Total %
branch 29 76 38.1


line true false branch
38 1885 5 if ($self->{'url'} and ref $self->{'url'} eq '')
39 2 1883 unless $self->{'url'} =~ /^redis:/
81 0 0 if ref $_[0] eq 'ARRAY'
111 0 1883 unless my $loop = $self->_loop($c->{'nb'})
112 2 1881 if $c->{'id'}
131 1881 4 if ($err)
139 0 0 if $self
140 0 0 if $self
141 0 0 if $self
144 2 2 if $db
145 1 3 if length $userinfo[1]
160 0 0 if (my $userinfo = $url->userinfo)
171 0 0 unless my $stream = $loop->stream($c->{'id'})
175 0 0 unless ($queue->[0])
180 0 0 if (not $loop->is_running and $stream->is_readable)
198 0 1881 if $self->{'destroy'}
199 0 1881 unless defined $err
200 0 1881 unless @$waiting
205 2 1881 ref $_[-1] eq 'CODE' ? :
208 0 1883 unless ($self->{'pid'} //= $$) eq $$
210 2 1881 if ($cb) { }
213 2 0 unless $c->{'id'}
221 0 1881 $c->{'id'} ? :
223 1881 0 if $err
229 4 7528 $_[1] ? :
238 0 0 unless $i++
239 0 0 if $self->encoding
247 0 1 ref $_[-1] eq 'CODE' ? :
249 1 0 ref $_[0] eq 'ARRAY' ? :
251 0 1 unless (@$channels)
272 0 0 if (ref $data eq 'SCALAR') { }
0 0 elsif (ref $data eq 'ARRAY' and $data->[0] and $data->[0] =~ /^(p?message)$/i) { }
274 0 0 if $cb
282 0 0 if $cb
293 0 0 if ($type ne '*' and $self->encoding and $data)
297 0 0 if ($type eq '-') { }
0 0 elsif ($type ne '*') { }
311 0 0 unless delete $c->{'waiting'}