Branch Coverage

blib/lib/URI/Fetch.pm
Criterion Covered Total %
branch 37 42 88.1


line true false branch
39 0 21 if %param
43 13 8 if ($cache)
44 11 2 unless ($freeze and $thaw)
49 6 7 if (my $blob = $cache->get($uri))
55 4 17 if ($p_no_net)
56 0 4 if $p_no_net < 0
57 2 1 if ($ref and $p_no_net == 1 || $ref->{'CacheTime'} > time - $p_no_net)
67 1 1 if $p_no_net == 1
78 18 0 if ($HAS_ZLIB)
81 6 12 if (my $etag = $p_etag || $ref->{'ETag'})
84 6 12 if (my $ts = $p_lastmod || $ref->{'LastModified'})
94 1 17 if ($res->previous and $res->previous->code == 301) { }
1 16 elsif ($res->code == 410) { }
7 9 elsif ($res->code == 304) { }
2 7 elsif (not $res->is_success) { }
109 1 1 $force ? :
117 0 8 if ($res->content_encoding and $res->content_encoding eq 'gzip')
125 1 7 if ($content_hook)
126 0 1 unless ref $content_hook eq 'CODE'
134 1 5 $p_cache_grep ? :
5 1 if ($cache and $p_cache_grep ? &$p_cache_grep($fetch) : 1)