Branch Coverage

blib/lib/MetaCPAN/Client/Request.pm
Criterion Covered Total %
branch 36 60 60.0


line true false branch
54 2 20 if $args{'domain'}
62 19 1 unless eval { do { $info = $self->ua->get("https://clientinfo.metacpan.org"); $info = &decode_json($info->{'content'}); die unless is_hashref($info) and exists $info->{'production'}; 1 } }
65 0 1 unless is_hashref($info) and exists $info->{'production'}
80 0 47 unless my $url = shift()
86 1 46 keys %{$params;} ? :
118 0 47 unless my $url = shift()
120 0 47 unless is_hashref($result)
125 0 47 unless defined $success
128 0 47 unless ($success)
129 0 0 $result->{'status'} == 599 ? :
133 0 47 unless my $content = $result->{'content'}
136 1 46 if $url =~ m[/pod/]
137 1 45 if $url =~ m[/source/]
143 0 45 unless (eval { do { $decoded_result = &decode_json($content); 1 } })
156 0 10 $args->{'__MATCH_ALL__'} ? :
184 0 10 if ($fields)
185 0 0 unless is_arrayref($fields)
190 0 10 if ($_source)
191 0 0 unless is_arrayref($_source) or not is_ref($_source)
204 10 0 unless is_ref($aggregations)
216 9 1 unless is_ref($filter)
226 10 0 unless is_ref($sort)
233 0 28 unless is_hashref($args)
240 0 9 if is_hashref($v)
241 0 9 unless is_arrayref($v)
248 4 5 if $k eq "either"
251 20 8 if $basic_element
259 0 24 unless scalar keys %{$args;} == 1
265 0 22 unless is_bool($val) or not is_ref($val) and $val =~ /[\w\*]/
269 15 9 $wildcard ? :