Branch Coverage

lib/Net/API/CPAN/Filter.pm
Criterion Covered Total %
branch 13 100 13.0


line true false branch
30 2 0 unless exists $self->{'aggs'}
31 2 0 unless exists $self->{'es'}
32 2 0 unless exists $self->{'fields'}
33 2 0 unless exists $self->{'filter'}
34 2 0 unless exists $self->{'from'}
35 2 0 unless exists $self->{'match_all'}
36 2 0 unless exists $self->{'name'}
37 2 0 unless exists $self->{'query'}
38 2 0 unless exists $self->{'size'}
39 2 0 unless exists $self->{'sort'}
40 2 0 unless exists $self->{'source'}
42 0 2 unless $self->SUPER::init(@_)
55 0 0 unless scalar keys %$hash
61 0 0 unless ($code = $self->can($k))
63 0 0 if $self->_is_warnings_enabled
74 0 0 if $self->{'_data_cache'} and not length $self->{'_reset'}
77 0 0 if (defined $es and $es->length) { }
84 0 0 if (my $aggs = $self->aggs)
88 0 0 if (my $fields = $self->fields)
90 0 0 unless $fields->is_empty
92 0 0 if (my $filter = $self->filter)
96 0 0 if (my $sort = $self->sort)
98 0 0 unless $sort->is_empty
100 0 0 if (my $source = $self->source)
104 0 0 if (my $name = $self->name)
106 0 0 if (exists $data->{'filter'} and exists $data->{'filter'}{'terms'} and ref $data->{'filter'}{'terms'} eq "HASH")
113 0 0 if (defined(my $from = $self->from))
117 0 0 if (defined(my $size = $self->size))
133 0 0 if $opts->{'pretty'}
134 0 0 if $opts->{'sort'}
140 0 0 if (exists $opts->{'encoding'} and defined $opts->{'encoding'} and lc $opts->{'encoding'} eq 'utf-8' || lc $opts->{'encoding'} eq 'utf8') { }
151 0 0 if ($@)
173 0 0 if (@_)
178 0 0 if ref $this ne "HASH"
198 0 0 if (scalar grep(/^($op_re)$/, keys %$ref)) { }
202 0 0 unless exists $ref->{$op}
205 0 0 if (exists $es_ops->{$op})
210 0 0 if ref $def eq "HASH"
211 0 0 unless ($self->_is_array($def))
231 0 0 if $n > 1
243 0 0 if (ref $val eq 'HASH') { }
0 0 elsif (!ref($val) || $self->_can_overload($val, '""') and "$val" =~ /[\w\*]/) { }
253 0 0 "$val" =~ /[*?]/ ? :
267 0 0 unless ($self->{'query'})
270 0 0 if ($match_all)
272 0 0 if ($match_all == 1) { }
288 1 0 if (not exists $self->{'_reset'} && defined $self->{'_reset'} && length $self->{'_reset'} and scalar @_)
306 0 0 if (@_)
308 0 0 if (not defined $_[0]) { }
0 0 elsif ($self->_is_array($_[0]) or not ref $_[0] or ref $_[0] and $self->_can_overload($_[0], '""')) { }