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 5 71 if (defined(my $regexp = delete $options{'regexp'}))
297 2 74 if (my $regexps = delete $options{'regexps'})
300 2 74 defined $options{'suffix'} ? :
310 6 70 defined $options{'glob'} ? :
73 3 unless $options{'globs'}
312 0 11 unless ($_ =~ /[[*?]/)
320 11 65 if (@regexps)
324 9 67 if (@globs)
331 2 74 if (defined(my $ref = $options{'database_str_ref'})) { }
18 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 49 26 if (my $mref = $self->{'mref'}) { }
413 3 46 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'}) { }