Branch Coverage

blib/lib/Fortune.pm
Criterion Covered Total %
branch 22 36 61.1


line true false branch
139 0 2 unless my $file = 'IO::File'->new($$self{'filename'})
154 2 0 if defined $$self{'file'}
224 0 1 if (not -f $filename and -f $$self{'filename'})
227 0 1 unless my $hdr_file = 'IO::File'->new($filename)
241 0 1 unless read($hdr_file, $header, 24) == 24
249 0 1 unless read($hdr_file, $data, $amount_data) == $amount_data
252 0 1 unless @offsets == $expected_offsets
280 0 1 unless defined $delim
285 0 1 unless my $file = 'IO::File'->new($filename)
294 1 5 if (not defined $min or $len < $min) { }
4 1 elsif (not defined $max or $len > $max) { }
316 0 2 unless defined $$self{'numstr'}
349 0 18 unless defined $$self{'file'} and defined fileno $$self{'file'}
351 0 18 unless defined $$self{'numstr'}
353 2 16 unless $num < $$self{'numstr'} and $num >= 0
363 5 11 $num == $$self{'numstr'} - 1 ? :
368 0 16 unless read($file, $fortune, $length) == $length
384 0 10 unless defined $$self{'numstr'}