Branch Coverage

blib/lib/Doit/Lwp.pm
Criterion Covered Total %
branch 48 52 92.3


line true false branch
30 16 2 if $ua
38 1 36 unless (defined $url)
39 1 35 unless (defined $filename)
41 18 17 if (UNIVERSAL::isa($refresh, 'ARRAY')) { }
1 16 elsif (not $refresh =~ /^(always|never|unconditionally)$/) { }
42 1 17 if ($refresh->[0] ne "digest")
45 2 15 if (@$refresh < 2 or @$refresh > 3)
51 1 30 if %opts
53 21 9 if (-e $filename)
54 1 20 if ($refresh eq 'never') { }
10 20 elsif (UNIVERSAL::isa($refresh, 'ARRAY') and $refresh->[0] eq 'digest') { }
55 0 1 if ($debug)
62 5 5 if ($self->file_digest_matches($filename, $digest, $type)) { }
63 0 5 if ($debug)
75 0 24 if ($self->is_dry_run) { }
80 7 17 if ($refresh eq 'unconditionally') { }
84 1 6 if (ref $ua eq 'HTTP::Tiny') { }
103 6 18 if (ref $ua eq 'HTTP::Tiny') { }
104 2 4 if ($debug)
108 2 4 if (not $resp->{'success'}) { }
1 3 elsif ($resp->{'status'} == 304) { }
110 1 1 if ($resp->{'status'} == 599)
120 3 15 if ($debug)
123 2 16 if ($resp->code == 304) { }
3 13 elsif (not $resp->is_success) { }
0 13 elsif ($resp->header('X-Died')) { }