blib/lib/HTTP/Tiny/FileProtocol.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
branch | 13 | 24 | 54.1 |
line | true | false | branch |
---|---|---|---|
21 | 0 | 1 | unless @_ == 2 or @_ == 3 and ref $args eq 'HASH' |
24 | 0 | 4 | unless ($url =~ m[\Afile://]) |
36 | 1 | 3 | if (not -e $path) { } |
0 | 3 | elsif (not -r $path) { } | |
55 | 3 | 0 | if (open my $fh, '<', $path) { } |
77 | 0 | 0 | unless @_ == 3 or @_ == 4 and ref $args eq 'HASH' |
80 | 0 | 1 | unless ($url =~ m[\Afile://]) |
87 | 0 | 1 | unless sysopen my $fh, $tempfile, 193 |
93 | 1 | 0 | if ($response->{'success'}) |
96 | 0 | 1 | unless rename $tempfile, $file |
100 | 0 | 1 | unless close $fh |
116 | 1 | 3 | !$success ? : |