Branch Coverage

blib/lib/Catmandu/Importer/getJSON.pm
Criterion Covered Total %
branch 37 52 71.1


line true false branch
50 11 0 unless (blessed $url)
54 11 0 if ($url->isa('URI::Template'))
55 5 6 unless (my(@variables) = $url->variables)
69 2 0 ref $_[2] ? :
92 2 0 ref $data ? :
99 0 15 if (blessed $cache and $cache->can('get') and $cache->can('set')) { }
1 14 elsif ($cache and -d $cache) { }
2 12 elsif ($cache) { }
151 5 17 $line =~ /^\s*{/ ? :
156 3 26 @_ > 1 ? :
160 9 20 if (ref $request and not blessed $request) { }
0 20 elsif (blessed $request and $request->isa('URI::URL')) { }
15 5 elsif ($request =~ m[^https?://]) { }
4 1 elsif ($request =~ m[^/]) { }
161 0 9 unless blessed $url
162 5 4 if ($url->isa('URI::Template')) { }
190 13 22 if ($self->dry)
194 9 13 if ($self->cache)
196 5 4 if (defined $json)
197 5 0 ref $json ? :
201 0 17 if ($self->wait and $self->time)
208 17 0 if ($response->is_success) { }
213 0 0 if $self->warn
214 0 0 if ($response->status =~ /^4/) { }
221 4 13 if ($self->cache)
225 17 0 ref $json ? :