Branch Coverage

blib/lib/Thread/Queue.pm
Criterion Covered Total %
branch 22 62 35.4


line true false branch
30 0 2 if ($self->{'ENDED'})
40 2 0 if push @$queue, map({shared_clone($_);} @_)
57 0 6 if $self->{'ENDED'} and not @{$self->{'queue'};}
79 5 7 @_ ? :
85 0 7 if $self->{'ENDED'}
88 7 0 if ($count == 1)
108 5 1 @_ ? :
111 1 0 if ($count == 1)
120 0 0 unless @$queue
135 0 0 @_ ? :
137 0 0 if ($timeout < 32000000)
141 0 0 @_ ? :
145 0 0 unless &cond_timedwait(\%$self, $timeout)
157 4 0 @_ ? :
167 0 4 if ($self->{'ENDED'})
176 0 0 unless @_
179 0 0 if ($index < 0)
181 0 0 if ($index < 0)
208 8 0 @_ ? :
209 5 0 @_ ? :
212 0 0 if ($index < 0)
214 0 0 if ($index < 0)
216 0 0 if $count <= 0
237 0 0 if $count == 1
251 10 6 if (not defined $index && &looks_like_number($index) or int $index != $index)
259 4 6 unless defined $index
272 6 0 if (not defined $count && &looks_like_number($count) or int $count != $count or $count < 1 or $self->{'LIMIT'} and $count > $self->{'LIMIT'})
282 3 12 unless defined $count
283 0 15 if ($self->{'LIMIT'} and $count > $self->{'LIMIT'}) { }
299 0 0 unless (defined $timeout and &looks_like_number($timeout))
306 0 0 unless defined $timeout