Branch Coverage

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


line true false branch
17 0 11 unless $#_ % 2 == 0
22 0 11 if $params{'ua_args'} and ref $params{'ua_args'} ne 'ARRAY'
40 1 9 unless @_ % 2 == 0
62 2 1 @_ ? :
66 1 2 unless %opts
68 1 1 if (defined(my $author = $opts{'author'}) and defined(my $release = $opts{'release'}) and defined(my $path = $opts{'path'})) { }
81 0 1 unless $$result{'success'}
92 3 1 @_ ? :
97 1 3 unless %opts
101 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'})) { }
109 0 0 unless ref $search_opts and ref $search_opts eq 'HASH'
126 8 1 @_ ? :
130 1 8 unless %opts
132 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'})) { }
146 5 2 if (defined(my $type = $opts{'content-type'}))
147 1 4 unless $type =~ m[^ text/ (?: html|plain|x-pod|x-markdown ) $]x
156 0 6 unless $$result{'success'}
168 1 1 unless $name
183 1 1 if (@_ == 1) { }
0 1 elsif (@_ == 2) { }
188 0 0 if (defined $opts{'pauseid'}) { }
0 0 elsif (defined $opts{'search'}) { }
193 0 0 unless ref $search_opts and ref $search_opts eq 'HASH'
215 1 5 $extra ? :
228 1 4 unless defined $url
231 2 2 unless ref $query and ref $query eq 'HASH'
252 1 14 unless ref $result and ref $result eq 'HASH'
255 1 13 unless defined $url
258 12 1 if (defined(my $success = $$result{'success'})) { }
260 2 10 defined $original ? :
262 2 10 unless $success
267 0 10 unless defined(my $content = $$result{'content'})
271 1 9 unless (eval { do { $decoded_result = decode_json($content); 1 } })