Branch Coverage

blib/lib/Pod/Simple/Search.pm
Criterion Covered Total %
branch 102 258 39.5


line true false branch
7 13 0 unless defined &Pod::Simple::Search::DEBUG
52 0 14 unless ref $self
61 5 9 if $self->{'limit_glob'}
67 0 29 unless ("File::Spec"->file_name_is_absolute($try))
76 3 26 if ($self->{'dir_prefix'}) { }
82 0 3 if $verbose
88 0 29 if ($self->{'_dirs_visited'}{$start_in}) { }
89 0 0 if $verbose
95 0 29 unless (-e $start_in)
96 0 0 if $verbose
102 29 0 if (-d $start_in) { }
0 0 elsif (-f _) { }
104 0 29 if $verbose
106 0 29 if $verbose
111 0 0 if $verbose
115 0 0 if $verbose
118 0 14 if $self->progress
122 1 13 unless defined wantarray
123 0 13 unless wantarray
138 0 29 if ($is_case_insensitive) { }
152 81 191 if ($isdir)
154 16 65 unless ($recurse)
155 0 16 if $verbose
159 0 65 if ($self->{'_dirs_visited'}{$file})
160 0 0 if $verbose
164 0 65 if $verbose
166 65 0 unless ($laborious)
167 0 0 if (/^(\d+\.[\d_]{3,})\z/s and do { my $x = $1; $x =~ tr/_//d; $x != $] })
170 0 0 if $verbose
174 65 0 if (/^([A-Za-z][a-zA-Z0-9_]*)\z/s) { }
175 0 65 if $verbose
177 0 0 if $verbose
187 0 191 if ($laborious) { }
188 0 0 unless (/\.(pod|pm|plx?)\z/i || -x _ and -T _)
192 0 0 if $verbose > 1
196 24 167 unless (/^[-_a-zA-Z0-9]+\.(?:pod|pm|plx?)\z/is)
197 0 24 if $verbose > 1
202 0 167 if $verbose
204 0 167 if $verbose > "0.01"
206 62 105 if ($limit_re and not $name =~ /$limit_re/i)
207 0 62 if $verbose
211 4 101 if (not $shadows and &$seen($name))
212 0 4 if $verbose
220 0 101 if $progress
221 6 95 unless $self->contains_pod($file)
225 10 85 if (my $prev = &$seen($name)) { }
226 0 10 if $verbose
232 0 95 if $verbose
233 18 77 if ($callback)
273 0 0 if ($^O eq "VMS" and $name eq lc $name || $name eq uc $name)
274 0 0 unless open PODFILE, "<$file"
280 0 0 if $line =~ /^=\w/
281 0 0 if $line =~ /^=cut/
282 0 0 unless $in_pod
283 0 0 if $line =~ /^\s*\z/
284 0 0 if $in_pod and $line =~ /^X
285 0 0 if ($in_name)
286 0 0 if ($line =~ /(\w+::)?(\w+)/)
290 0 0 if $verbose
291 0 0 unless ($name =~ s/$prefix$podname/$prefix$podname/i)
292 0 0 if $verbose
298 0 0 if $line =~ /^=head1 NAME/
321 0 94 if (@$modname_bits >= 10)
322 0 0 if $verbose
326 0 94 unless (-d $dir_long)
327 0 0 if $verbose > 2
330 0 94 unless (opendir INDIR, $dir_long)
331 0 0 if $verbose > 2
338 0 637 unless $Pod::Simple::Search::a->[1] cmp $Pod::Simple::Search::b->[1]
345 65 29 unless $dir_bare eq ""
349 94 272 if $i eq $here_string or $i eq $up_string or $i eq ""
352 0 272 if (not -r $i_full) { }
191 81 elsif (-f $i_full) { }
81 0 elsif (-d _) { }
353 0 0 if $verbose
360 0 81 if $^O eq "VMS"
364 16 65 if ($rv eq 'PRUNE') { }
365 0 16 if $verbose > 1
371 0 0 if $verbose > 1
393 0 0 if @ARGV
402 0 0 if ($file =~ /\.pod$/i) { }
0 0 elsif (not open(INPOD, $file)) { }
412 0 0 if $lines++ > $MAX_VERSION_WITHIN
413 0 0 if (s/^\s*\$VERSION\s*=\s*//s and /\d/)
420 0 0 if /^v?["']?([0-9_]+(\.[0-9_]+)*)["']?$/s or /\$Revision:\s*([0-9_]+(?:\.[0-9_]+)*)\s*\$/s
429 0 0 if /\$Name:\s*([^\$]+)\$/s
456 0 0 if ($^O eq 'MacOS') { }
471 0 167 if $^O =~ /mswin|os2/i
474 0 167 if $^O eq "VMS"
484 15 0 unless $self->{'inc'}
487 0 0 if ($^O eq 'MacOS') { }
506 0 0 if ($_ eq '.') { }
0 0 elsif ($_ =~ s[^((?:\.\./)+)][':' x (length($1) / 3);]e) { }
528 0 5 if $self->{'verbose'}
531 1 4 if (not exists $self->{'dir_prefix'} and $limit_glob =~ /^(?:\w+\:\:)+/s)
536 0 1 if $self->{'verbose'}
549 0 4 unless opendir my $dh, $dir
556 0 1 unless ref $self
559 0 1 unless defined $pod and length $pod
566 0 1 if $verbose
572 0 1 if $self->inc
576 0 3 unless defined $dir and length $dir
577 0 3 if $seen_dir{$dir}
579 0 3 unless (-d $dir)
580 0 0 if $verbose
583 0 3 if $verbose
585 0 3 if $verbose
589 1 9 if (-f $fullext and $self->contains_pod($fullext))
590 0 1 if $verbose
591 0 0 if (@parts > 1 and lc $parts[0] eq "pod" and $self->is_case_insensitive and $ext eq ".pod")
596 0 0 unless (grep {$fullext eq $_;} _actual_filenames($subdir, "$parts[-1].pod"))
597 0 0 if $verbose
600 0 0 if (-f $pm and $self->contains_pod($pm))
602 0 0 if (grep {$pm eq $_;} _actual_filenames($subdir, "$parts[-1].pm"))
603 0 0 if $verbose
615 2 0 if (-d $subdir)
616 0 2 if $verbose
632 0 102 if $verbose > 1
633 0 102 unless (open MAYBEPOD, "<$file")
638 0 102 if $SLEEPY
643 96 118 if (/^=(head\d|pod|over|item)\b/s)
644 0 96 unless close MAYBEPOD
646 0 96 if $verbose > 1
650 0 6 unless close MAYBEPOD
651 0 6 if $verbose > 1
663 0 710 unless @_ == 1 || @_ == 2 and ref $_[0]
668 572 138 if @_ == 1
682 0 11 unless ref $self
695 11 91 unless defined $in