Branch Coverage

blib/lib/MetaCPAN/API/Tiny.pm
Criterion Covered Total %
branch 57 72 79.1


line true false branch
15 0 11 unless $#_ % 2 == 0
20 0 11 if $params{'ua_args'} and ref $params{'ua_args'} ne 'ARRAY'
38 1 9 unless @_ % 2 == 0
60 2 1 @_ ? :
64 1 2 unless %opts
66 1 1 if (defined(my $author = $opts{'author'}) and defined(my $release = $opts{'release'}) and defined(my $path = $opts{'path'})) { }
79 0 1 unless $$result{'success'}
90 3 1 @_ ? :
95 1 3 unless %opts
99 1 2 if (defined(my $dist = $opts{'distribution'})) { }
1 1 elsif (defined(my $author = $opts{'author'}) and defined(my $release = $opts{'release'})) { }
0 1 elsif (defined(my $search_opts = $opts{'search'})) { }
107 0 0 unless ref $search_opts and ref $search_opts eq 'HASH'
124 8 1 @_ ? :
128 1 8 unless %opts
130 6 2 if (defined(my $module = $opts{'module'})) { }
1 1 elsif (defined(my $author = $opts{'author'}) and defined(my $release = $opts{'release'}) and defined(my $path = $opts{'path'})) { }
144 5 2 if (defined(my $type = $opts{'content-type'}))
145 1 4 unless $type =~ m[^ text/ (?: html|plain|x-pod|x-markdown ) $]x
154 0 6 unless $$result{'success'}
166 1 1 unless $name
181 1 1 if (@_ == 1) { }
0 1 elsif (@_ == 2) { }
186 0 0 if (defined $opts{'pauseid'}) { }
0 0 elsif (defined $opts{'search'}) { }
191 0 0 unless ref $search_opts and ref $search_opts eq 'HASH'
213 1 5 $extra ? :
226 1 4 unless defined $url
229 2 2 unless ref $query and ref $query eq 'HASH'
250 1 14 unless ref $result and ref $result eq 'HASH'
253 1 13 unless defined $url
256 12 1 if (defined(my $success = $$result{'success'})) { }
258 2 10 defined $original ? :
260 2 10 unless $success
265 0 10 unless defined(my $content = $$result{'content'})
269 1 9 unless (eval { do { $decoded_result = decode_json($content); 1 } })