Branch Coverage

blib/lib/CPAN/SQLite/DBI/Search.pm
Criterion Covered Total %
branch 69 92 75.0


line true false branch
45 871 0 ref $fields eq 'ARRAY' ? :
46 0 871 unless (my $sql = $self->sql_statement(%args))
50 0 871 unless (my $sth = $CPAN::SQLite::DBI::Search::dbh->prepare($sql))
54 0 871 unless ($sth->execute)
59 646 225 if (not $search->{'wantarray'}) { }
62 6 640 $sth->rows == 0 ? :
65 640 6 if $results
74 3 222 if $sth->rows == 0
86 0 1942 unless $meta_obj and ref($meta_obj) =~ /^CPAN::SQLite::META/
88 1942 0 ref $fields eq 'ARRAY' ? :
89 0 1942 unless (my $sql = $self->sql_statement(%args))
93 0 1942 unless (my $sth = $CPAN::SQLite::DBI::Search::dbh->prepare($sql))
97 0 1942 unless ($sth->execute)
105 921 1021 if (not $search->{'wantarray'}) { }
108 8 913 $sth->rows == 0 ? :
111 8 913 unless $results
115 907 6 if ($want_ids) { }
126 22772 308 if ($set_list) { }
131 298 10 if ($want_ids)
142 6 1015 if $sth->rows == 0
145 10 1011 unless $meta_results
146 995 16 if $set_list
147 16 995 $want_ids ? :
153 2552 29 if ($results->{'cpanid'} and $results->{'dist_file'})
163 1567 1246 $search->{'distinct'} ? :
167 2813 0 ref $fields eq 'ARRAY' ? :
169 4657 17966 if $CPAN::SQLite::DBI::Search::full_id->{$_}
176 38 2775 if ($type eq 'query')
178 0 38 if $value eq '^'
181 26 12 $value =~ /^\^?[A-Za-z0-9_\\\:\-]+$/ ? :
183 4 34 if ($use_like and $value =~ /^\^/)
189 26 12 $use_like ? :
193 10 28 if ($name eq 'cpanid')
194 6 4 $use_like ? :
201 1208 1567 if ($type eq 'id')
205 1567 0 if ($type eq 'name')
216 1579 1234 if ($left_join)
217 1579 0 if (ref $left_join eq 'HASH')
225 2813 0 if ($where) { }
227 0 2813 if $join
229 0 0 if $join
233 2813 0 if (my $user_order_by = $args{'order_by'})
234 0 2813 $order_by ? :
236 2813 0 if ($order_by and $where)
240 0 2813 if (my $limit = $args{'limit'})
244 0 0 ref $limit eq 'HASH' ? :