Branch Coverage

blib/lib/CGI/Easy/SendFile.pm
Criterion Covered Total %
branch 26 30 86.6


line true false branch
25 3 22 unless $opt
28 20 5 if (not $p{'cache'}) { }
33 4 1 unless (ref $file)
36 1 3 if ($ifmod and $ifmod eq $lastmod) { }
46 19 5 ref $file ? :
53 19 5 unless ($p{'inline'})
56 8 16 unless ($start == 0 and $end == $len - 1)
67 15 9 if ($allow_range and defined $r->{'ENV'}{'HTTP_RANGE'})
68 15 0 if ($r->{'ENV'}{'HTTP_RANGE'} =~ /\Abytes=(\d*)-(\d*)\z/imsx)
70 5 10 if ($from ne '' and $to ne '' and $from <= $to and $to < $len) { }
3 7 elsif ($from ne '' and $to eq '' and $from < $len) { }
3 5 elsif ($from eq '' and $to ne '' and 0 < $to and $to <= $len) { }
88 0 24 unless open my $fh, '<', $file
95 0 24 unless defined $n
96 0 24 unless close $fh