Branch Coverage

blib/lib/File/Locate/Iterator.pm
Criterion Covered Total %
branch 53 66 80.3


line true false branch
212 0 0 if (defined(my $env = $ENV{'LOCATE_PATH'})) { }
294 4 71 if (defined(my $regexp = delete $options{'regexp'}))
297 2 73 if (my $regexps = delete $options{'regexps'})
300 2 73 defined $options{'suffix'} ? :
310 6 69 defined $options{'glob'} ? :
72 3 unless $options{'globs'}
312 0 11 unless ($_ =~ /[[*?]/)
320 10 65 if (@regexps)
324 9 66 if (@globs)
331 2 73 if (defined(my $ref = $options{'database_str_ref'})) { }
17 56 elsif (defined $options{'database_str'}) { }
339 48 8 defined $options{'use_mmap'} ? :
342 33 23 if ($use_mmap)
343 0 33 unless (eval { do { require File::Locate::Iterator::FileMap } })
350 11 45 if (defined $fh) { }
351 0 11 if ($use_mmap eq 'if_sensible' and File::Locate::Iterator::FileMap::_have_mmap_layer($fh))
358 45 0 defined $options{'database_file'} ? :
365 0 45 unless open $fh, '<', $file
367 0 45 unless binmode $fh
371 8 48 if ($use_mmap eq 'if_sensible')
372 0 8 File::Locate::Iterator::FileMap::_mmap_size_excessive($fh) ? :
378 33 23 if ($use_mmap)
392 32 1 if ($use_mmap eq 'if_possible') { }
393 1 31 if (not -f $fh) { }
396 2 29 unless (eval { do { $self->{'fm'} = 'File::Locate::Iterator::FileMap'->get($fh) } })
405 29 26 if ($self->{'fm'}) { }
412 48 26 if (my $mref = $self->{'mref'}) { }
413 3 45 unless ($$mref =~ /^\Q$header\E/o)
418 3 23 if ($got ne $header)
433 5 7 if ($self->{'mref'}) { }
436 0 7 unless $self->{'fh_start'} > 0
438 0 7 unless seek $self->{'fh'}, $self->{'fh_start'}, 0
468 0 0 if (defined $self->{'entry'}) { }