Branch Coverage

blib/lib/Test/Pod/LinkCheck/Lite.pm
Criterion Covered Total %
branch 146 218 66.9


line true false branch
66 0 4 if $url =~ / \A (?: data | mailto | urn ) : /imsx
68 0 4 unless $url =~ m[ / \z ]msx
74 0 0 unless m[ \A https://github\.com \b ]msx
77 0 0 unless -d $git_dir
79 0 1 unless open my $fh, "-|", ("git", "remote", "--verbose")
83 1 0 if m[ \b https://github\.com \b ]msx
116 254 21 unless exists $arg{$key}
119 275 0 if (my $code = $self->can("_init_$name")) { }
0 0 elsif (defined $arg{$name}) { }
158 2 22 unless ($checked)
167 0 2 if ({'DOS', 1, 'MSWin32', 1}->{$^O}) { }
175 2 0 unless $rslt = IPC::Cmd::can_run("man")
187 1880 46 unless / \A _get_module_index_ ( .+ ) /msx and "Test::Pod::LinkCheck::Lite"->can($_)
216 0 25 $value ? :
222 25 0 $value ? :
228 24 1 $value ? :
234 24 1 $value ? :
281 0 25 unless eval { do { $handler{ref $value}($spec, $value); 1 } }
292 0 25 $value ? :
299 23 2 'ARRAY' eq ref $value ? :
302 0 48 unless my $code = $self->can("_get_module_index_$mi")
313 2 23 if ('CODE' eq ref $value) { }
1 22 elsif ($value) { }
332 1 24 $value ? :
338 24 1 $value ? :
351 0 1 unless @dir
363 12 1 if ($self->_is_perl_file($_))
378 0 1 wantarray ? :
404 0 1 unless defined $leader
432 4 4 $value ? :
439 1 0 unless $spec->{''}
440 1 0 unless $spec->{'Regexp'}
441 1 0 unless $spec->{'CODE'}
443 0 1 wantarray ? :
453 7 15 unless @_ > 1
455 0 15 if $spec->{''}{$url}
458 1 0 if $url =~ /$re/
463 1 0 if &$code()
477 2 0 if wantarray
492 1 45 if ('SCALAR' eq ref $file) { }
44 1 elsif (-f $file) { }
493 0 1 ${$file;} =~ / \n /msx ? :
502 1 0 wantarray ? :
509 7 38 unless (@{$self->{'_links'};})
511 3 4 wantarray ? :
517 0 43 unless my $code = $self->can("_handle_$link->[1]{'type'}")
524 30 8 unless $errors
527 14 24 wantarray ? :
555 37 0 unless @msg
580 0 0 defined $file ? :
590 16 39 if ("ARRAY" eq ref $msg[0])
593 16 0 defined $link->[1]{'raw'} ? :
596 15 1 if defined $link->[1]{'line_number'}
623 5 5 if defined $path
630 0 5 if Module::Load::Conditional::check_install("module", $module)
646 1 0 unless $self->man
650 0 0 unless $link->[1]{'to'}
652 0 0 unless my($page, $sect) = $link->[1]{'to'} =~ / ( [^(]+ ) (?: [(] ( [^)]+ ) [)] )? /msx
658 0 0 if $page =~ / \s /msx and not $self->allow_man_spaces
662 0 0 $sect ? :
667 0 0 if $self->{'_cache'}{'man'}{join $", @pg} ||= IPC::Cmd::run('COMMAND', [('man', '-w'), @pg]) || 0
679 16 10 if ($link->[1]{'to'}) { }
9 1 elsif (my $section = $link->[1]{'section'}) { }
685 8 1 if $self->{'_section'}{$section}
714 16 0 $link->[1]{'to'} ? :
715 5 11 $link->[1]{'section'} ? :
719 11 5 unless ($section)
720 2 9 if $self->_is_perl_function($module)
725 9 5 if (my $data = ($self->{'_cache'}{'installed'}{$module} ||= $self->_get_installed_doc_info($module)))
736 0 9 if $data->{'undocumented'}
745 5 4 unless $link->[1]{'section'} and $self->check_external_sections
752 3 1 if $data->{'section'}{$section}
760 1 4 if $self->require_installed
776 4 0 if (@inxes) { }
781 0 4 unless &$modinx($module)
784 4 0 unless $link->[1]{'section'}
818 3 0 if (_has_usable("File::HomeDir", "0.52"))
825 3 0 if $ENV{'HOME'}
829 0 0 if $ENV{'HOMEDRIVE'} and $ENV{'HOMEPATH'}
831 0 3 if $ENV{'USERPROFILE'}
833 0 3 if $ENV{'SYS$LOGIN'}
839 0 5 unless defined $dir
842 3 2 unless -e $path
845 0 2 unless my $hash = Storable::retrieve($path)
867 0 2 if exists $hash{$_[0]}
881 1 15 unless $self->check_url
886 0 15 unless my $url = "$link->[1]{'to'}"
889 2 13 if $self->__ignore_url($url)
893 13 0 if ($self->cache_url_response) { }
900 11 2 if ($resp->{'success'}) { }
904 4 2 unless "CODE" eq ref $code
913 1 1 if $self->skip_server_errors and $resp->{'status'} =~ / \A 5 /msx
929 1 2 unless (exists $checked{$module})
936 0 1 unless (eval { do { require $fn; $checked{$module} = 1; 1 } })
941 0 3 unless $checked{$module}
944 3 0 if (defined $version)
957 3 17 unless -e $path and -T _
960 16 1 if $path =~ / [.] (?: (?i: pl ) | pm | pod | t ) \z /msx
962 0 1 unless open my $fh, "<", $path
1010 48 0 if defined $source
1015 628 0 if (my $code = $self->can("__token_" . $token->type))
1020 0 48 if $err and $self->any_errata_seen
1024 45 3 wantarray ? :
1034 0 75 unless defined $text
1045 152 59 if (defined(my $line = $token->attr("start_line")))
1049 43 168 if ('L' eq $tag) { }
28 140 elsif ($section_tag{$tag}) { }
1052 39 47 unless my $sect = $token->attr($name)
1076 28 183 if ($section_tag{$tag})