Branch Coverage

blib/lib/PAGI/Server/AsyncFile.pm
Criterion Covered Total %
branch 20 54 37.0


line true false branch
68 27 0 builtin::blessed($loop) ? :
70 2 25 unless ($_function_pools{$loop_id})
92 0 0 if ($op eq 'read_file') { }
0 0 elsif ($op eq 'read_chunk') { }
0 0 elsif ($op eq 'write_file') { }
0 0 elsif ($op eq 'append_file') { }
0 0 elsif ($op eq 'file_size') { }
0 0 elsif ($op eq 'file_exists') { }
94 0 0 unless open my $fh, "<:raw", $path
102 0 0 unless open my $fh, "<:raw", $path
103 0 0 if $offset
110 0 0 unless open my $fh, ">:raw", $path
117 0 0 unless open my $fh, ">>:raw", $path
128 0 0 -f $path ? :
159 1 10 unless -f $path
160 0 10 unless -r $path
214 0 6 unless -f $path
215 0 6 unless -r $path
228 3 3 defined $max_length ? :
231 0 6 if $end_pos > $file_size
237 4 11 if ($offset + $to_read > $end_pos)
241 0 15 if $to_read <= 0
247 0 15 unless $bytes_read
251 4 11 if (builtin::blessed($result) and $result->can("get"))
363 1 0 if ($loop) { }
364 1 0 builtin::blessed($loop) ? :
365 1 0 if (my $function = delete $_function_pools{$loop_id})