Condition Coverage

blib/lib/Forks/Queue/SQLite.pm
Criterion Covered Total %
condition 92 164 56.1


and 2 conditions

line l !l condition
254 0 208 0 $z1 && $z2

and 3 conditions

line !l l&&!r l&&r condition
26 36 2 0 $opts{'join'} and not $opts{'db_file'}
29 33 5 0 $opts{'file'} and not $opts{'db_file'}
39 2 34 2 not $opts{'join'} and -f $opts{'db_file'}
43 36 0 2 $opts{'join'} && -f $opts{'db_file'}
60 34 2 0 $z1 and not $z2
151 2 12 28055 $self->{'_dbh'} and $$ == $self->{'_pid'}[0]
14 0 28055 $self->{'_dbh'} and $$ == $self->{'_pid'}[0] and $tid == $self->{'_pid'}[1]
191 0 0 34 $dbh && eval { do { $dbh->{'PrintWarn'} = $dbh->{'PrintError'} = 0; $dbh->begin_work; my $z1 = _try(3, sub { $dbh->do("DELETE FROM pids WHERE pid=$$ AND tid=$tid"); } ); if ($z1) { my $sth = $dbh->prepare('SELECT COUNT(*) FROM pids'); my $z2 = $sth->execute; $t = $sth->fetchall_arrayref; } else { print STDERR "$$ DESTROY: DELETE FROM pids failed\n" if $_DEBUG; $t = [[-2]]; } ; $dbh->commit; print STDERR "$$ DESTROY npids=$t->[0][0]\n" if $_DEBUG; 1 } }
212 0 0 34 $t and $t->[0]
0 11 23 $t and $t->[0] and $t->[0][0] == 0
226 22405 0 0 not $dbh and $self->{'_DESTROY'}
229 22197 0 0 not $sth and $self->{'_DESTROY'}
252 0 0 208 $z1 && _try(5, sub { $sth2->execute($key, $value); } )
395 0 0 2 @items and $self->_avail < $limit
462 125 21 1276 @items and $self->_avail < $limit
531 3 0 0 $self->limit > 0 and $count > $self->limit
699 6 2 24 @items and $self->_avail < $limit
749 69 48 0 $lo > 0 and $block
760 47 0 70 $purge && $dbh->prepare('DELETE FROM the_queue WHERE item=? AND timestamp=? AND batchid=?')
770 0 0 19936 $sths && $sths->execute($limit)
771 0 0 19936 $sths && $sths->fetchall_arrayref
772 19936 0 0 $lo < 0 and -$lo > @$tt
776 108 0 19814 $block > 1 and $lo == 0
108 2 19812 $block > 1 and $lo == 0 and @$tt < $hi
847 0 0 0 $block and $self->_wait_for_item
937 68 0 17 defined $candidate and $candidate ne ''
68 0 17 defined $candidate and $candidate ne '' and -d $candidate
0 0 17 defined $candidate and $candidate ne '' and -d $candidate and -w _
0 0 17 defined $candidate and $candidate ne '' and -d $candidate and -w _ and -x _

or 2 conditions

line l !l condition
34 38 0 $opts{'limit'} //= -1
35 38 0 $opts{'on_limit'} //= 'fail'
36 38 0 $opts{'style'} //= 'fifo'
347 13 165 $status->{'end'} //= 0
494 2114 0 $Forks::Queue::SLEEP_INTERVAL || 1
509 8 0 $Forks::Queue::SLEEP_INTERVAL || 1
530 3 0 $_[0] || 1
553 4 5 $_[0] // 1
575 16 7 CORE::shift() || 0
577 8 10 $_[0] // 1
830 0 0 $count ||= 1
880 29 6 $index ||= 0
891 18 9 $index ||= 0

or 3 conditions

line l !l&&r !l&&!r condition
24 0 0 38 $DEBUG || $opts{'debug'}
33 21 17 0 $opts{'db_file'} //= _impute_file()
182 0 0 34 $self->{'debug'} // $DEBUG
282 22 9 22126 $self->{'_end'} ||= $self->_status('end')
354 0 3660 0 $dbh ||= $self->_dbh
378 0 0 2 $self->{'debug'} // $DEBUG
445 0 0 148 $self->{'debug'} // $DEBUG
493 6 1 2114 $self->_avail || $self->_end || $self->_expired
516 148 0 0 $dbh ||= $self->_dbh
604 6 4 0 $items[0] // ()
611 0 0 10 $self->{'debug'} // $DEBUG
776 0 14 19922 not $tt or @$tt == 0
813 27 2 19835 $self->_end or $self->_expired
818 59 0 0 $return[0] // ()
909 0 0 64 $self->{'debug'} // $DEBUG
950 0 0 0 $fh_dump ||= *STDERR