Branch Coverage

blib/lib/App/PodLinkCheck.pm
Criterion Covered Total %
branch 32 160 20.0


line true false branch
35 0 0 unless ref $self
55 0 0 $self->{'report_count'} ? :
61 0 0 if ($self->{'verbose'} >= 2)
99 0 0 if (-d $filename) { }
197 0 0 if ($self->{'verbose'})
198 0 0 defined $to ? :
0 0 defined $section ? :
202 0 0 if ($type eq 'man')
203 0 0 unless ($self->manpage_is_known($to))
210 0 0 unless (defined $to)
211 0 0 if (defined $section and not $own_sections->{$section})
213 0 0 if (my $approximations = _section_approximations($section, $own_sections)) { }
224 0 0 if ($self->{'verbose'} >= 2)
237 0 0 unless (defined $podfile)
238 0 0 if (my $method = $self->_module_known_cpan($to))
239 0 0 if (defined $section and $section ne '')
250 0 0 if (not defined $podfile || defined $section and $self->manpage_is_known($to))
257 0 0 if (not defined $section and _is_one_word($to) and $own_sections->{$to})
261 0 0 if (defined $podfile) { }
271 0 0 unless (defined $podfile)
272 0 0 if ($own_sections->{$to})
281 0 0 if (defined $section and $section ne '')
283 0 0 unless ($podfile_sections->{$section})
284 0 0 if (my $approximations = _section_approximations($section, $podfile_sections)) { }
299 0 0 if ($self->{'verbose'} >= 2)
340 2 2 $1 eq '<' ? :
379 0 0 if ($self->$fullmethod($module))
399 1 0 unless ($self->{'verbose'})
405 1 0 if (not $CPAN::Config_loaded and 'CPAN::HandleConfig'->can('load'))
410 0 1 if ($self->{'verbose'})
418 0 1 unless (eval { do { require CPAN; unless ($self->{'verbose'}) { @App::PodLinkCheck::CPANquiet::ISA = $CPAN::Frontend; $CPAN::Frontend = 'App::PodLinkCheck::CPANquiet::ISA'; } ; if (not $CPAN::Config_loaded and 'CPAN::HandleConfig'->can('load')) { local $CPAN::HandleConfig::loading = 1; if ($self->{'verbose'}) { print &__x("PodLinkCheck: {module} configs\n", 'module', 'CPAN'); } ; 'CPAN::HandleConfig'->load; } ; $result = 1 } })
419 0 0 if ($self->{'verbose'})
429 1 2 unless (defined $self->{'cpan_sqlite'})
432 1 0 if ($self->_CPAN_config($self->{'verbose'}))
435 0 1 if ($self->{'verbose'})
439 1 0 unless (eval { do { require CPAN::SQLite } })
440 0 1 if ($self->{'verbose'})
450 0 0 if ($self->{'verbose'})
454 0 0 unless (eval { do { local $CPAN::HandleConfig::loading = 1; $self->{'cpan_sqlite'} = 'CPAN::SQLite'->new('update_indices', 0) } })
460 0 0 if ($self->{'verbose'})
475 0 0 unless (eval { do { $result = $cpan_sqlite->query('mode', 'module', 'name', $module); 1 } })
478 0 0 if ($self->{'verbose'})
494 1 2 unless (defined $use_CPAN)
497 1 0 if ($self->_CPAN_config($self->{'verbose'}))
499 0 1 if ($self->{'verbose'})
504 0 1 if (defined $CPAN::META and %$CPAN::META) { }
0 1 elsif (not 'CPAN::Index'->can('read_metadata_cache')) { }
507 0 0 if ($self->{'verbose'})
515 0 0 if (defined $CPAN::META and %$CPAN::META) { }
518 0 0 if ($self->{'verbose'})
525 1 0 unless (eval { do { if ($self->{'verbose'}) { print &__x("PodLinkCheck: load {module} for module existence checking\n", 'module', 'CPAN'); } ; if (defined $CPAN::META and %$CPAN::META) { $use_CPAN = 1; } elsif (not 'CPAN::Index'->can('read_metadata_cache')) { if ($self->{'verbose'}) { print &__("PodLinkCheck: no Metadata cache in this CPAN.pm\n"); } ; } else { local $CPAN::Config->{'use_sqlite'} = 0; 'CPAN::Index'->read_metadata_cache; if (defined $CPAN::META and %$CPAN::META) { $use_CPAN = 1; } else { if ($self->{'verbose'}) { print &__("PodLinkCheck: empty Metadata cache\n"); } ; } ; } ; 1 } })
526 0 1 if ($self->{'verbose'})
541 1 2 unless (defined $self->{'cpanplus'})
542 0 1 if ($self->{'verbose'})
546 1 0 unless (eval { do { require CPANPLUS::Backend; require CPANPLUS::Configure } })
550 0 1 if ($self->{'verbose'})
572 0 0 unless (eval { do { $result = $cpanplus->module_tree($module); 1 } })
573 0 0 if ($self->{'verbose'})
590 0 0 unless (open $fh, '<', $filename)
591 0 0 unless ($self->{'cpanminus-warned'}{$filename}++)
592 0 0 if ($self->{'verbose'})
600 0 0 unless ($self->{'cpanminus'}{$filename}++)
601 0 0 if ($self->{'verbose'})
608 0 0 if (_packages_details_bsearch($fh, $module))
630 0 3 unless (defined $home)
660 0 0 unless defined $pos
663 0 0 if $line =~ /^\Q$module\E /
664 0 0 unless $line =~ /^\Q$module\E /i
673 0 0 if ($line =~ /^([^ ]*[^ :]) /) { }
689 0 0 if (-e $filename)
706 0 0 if (defined $self->{'PATH'}) { }
721 2 4 if ($name =~ s/\s*\((.+)\)$//)
727 0 6 if (defined $$r)
733 0 6 $self->_man_has_location_option ? :
754 0 1 if ($self->{'verbose'} >= 2)
755 0 0 if ($ret) { }
770 0 0 unless (eval { do { IPC::Run::run(['man', '--location', @manargs], '<', \(undef), '>', \$str, '2>', 'File::Spec'->devnull); 1 } })
783 0 0 $str =~ /\n/ ? :
793 6 0 unless (eval { do { IPC::Run::run(['man', @manargs], '<', \(undef), '>', $fh, '2>', 'File::Spec'->devnull); 1 } })
808 0 0 unless (defined readline $fh)