Branch Coverage

blib/lib/Test/Pod/LinkCheck/Lite.pm
Criterion Covered Total %
branch 171 246 69.5


line true false branch
64 0 4 if $url =~ / \A (?: data | mailto | urn ) : /imsx
66 0 4 unless $url =~ m[ / \z ]msx
72 0 1 unless m[ \A https://github\.com \b ]msx
75 1 0 unless -d $git_dir
77 0 0 unless open my $fh, "-|", ("git", "remote", "--verbose")
81 0 0 if m[ \b https://github\.com \b ]msx
115 302 22 unless exists $arg{$key}
118 324 0 if (my $code = $self->can("_init_$name")) { }
0 0 elsif (defined $arg{$name}) { }
153 2 24 unless ($checked)
162 0 2 if ({'DOS', 1, 'MSWin32', 1}->{$^O}) { }
170 0 2 unless $rslt = IPC::Cmd::can_run("man")
180 0 26 if -d "blib/script"
188 2120 50 unless / \A _get_module_index_ ( .+ ) /msx and __PACKAGE__->can($_)
215 26 1 ref $value ? :
221 0 27 $value ? :
227 27 0 $value ? :
233 26 1 $value ? :
239 26 1 $value ? :
286 0 27 unless eval { do { $handler{ref $value}($spec, $value); 1 } }
297 27 0 $value ? :
304 25 2 'ARRAY' eq ref $value ? :
307 0 52 unless my $code = $self->can("_get_module_index_$mi")
318 2 25 if ('CODE' eq ref $value) { }
1 24 elsif ($value) { }
337 1 26 $value ? :
343 26 1 $value ? :
349 0 27 unless defined $value
351 0 27 unless eval { do { $value->isa("HTTP::Tiny") } }
356 0 27 if (ref $value) { }
368 1 0 unless defined $self->{'agent'}
376 0 1 unless @dir
388 12 1 if ($self->_is_perl_file($_))
403 0 1 wantarray ? :
434 0 1 unless defined $leader
462 5 3 $value ? :
469 1 0 unless $spec->{''}
470 1 0 unless $spec->{'Regexp'}
471 1 0 unless $spec->{'CODE'}
473 0 1 wantarray ? :
483 7 15 unless @_ > 1
485 0 15 if $spec->{''}{$url}
488 1 0 if $url =~ /$re/
493 1 0 if &$code()
507 2 0 if wantarray
522 1 48 if ('SCALAR' eq ref $file) { }
47 1 elsif (-f $file) { }
523 0 1 ${$file;} =~ / \n /msx ? :
532 1 0 wantarray ? :
539 7 41 unless (@{$self->{'_links'};})
541 3 4 wantarray ? :
547 0 48 unless my $code = $self->can("_handle_$link->[1]{'type'}")
554 32 9 unless $errors
557 15 26 wantarray ? :
587 0 14 if defined $self->{'agent'}
596 39 0 unless @msg
621 0 0 defined $file ? :
631 17 41 if ("ARRAY" eq ref $msg[0])
634 17 0 defined $link->[1]{'raw'} ? :
637 16 1 if defined $link->[1]{'line_number'}
657 1 0 if -e $path and -s _ and -T _
681 5 7 if defined $path
688 0 7 if Module::Load::Conditional::check_install("module", $module)
704 0 2 unless $self->man
708 0 2 unless $link->[1]{'to'}
710 0 2 unless my($page, $sect) = $link->[1]{'to'} =~ / ( [^(]+ ) (?: [(] ( [^)]+ ) [)] )? /msx
716 0 2 if $page =~ / \s /msx and not $self->allow_man_spaces
720 2 0 $sect ? :
725 2 0 if $self->{'_cache'}{'man'}{join $", @pg} ||= IPC::Cmd::run('COMMAND', [('man', '-w'), @pg]) || 0
737 20 10 if ($link->[1]{'to'}) { }
9 1 elsif (my $section = $link->[1]{'section'}) { }
743 8 1 if $self->{'_section'}{$section}
772 20 0 $link->[1]{'to'} ? :
773 7 13 $link->[1]{'section'} ? :
777 13 7 unless ($section)
778 2 11 if $self->_is_perl_function($module)
783 11 7 if (my $data = ($self->{'_cache'}{'installed'}{$module} ||= $self->_get_installed_doc_info($module)))
794 0 11 if $data->{'undocumented'}
803 6 5 unless $link->[1]{'section'} and $self->check_external_sections
810 4 1 if $data->{'section'}{$section}
818 1 6 if $self->require_installed
834 5 0 if (@inxes) { }
839 2 4 unless &$modinx($module)
842 4 0 unless $link->[1]{'section'}
876 4 0 if (_has_usable("File::HomeDir", "0.52"))
883 4 0 if $ENV{'HOME'}
887 0 0 if $ENV{'HOMEDRIVE'} and $ENV{'HOMEPATH'}
889 0 4 if $ENV{'USERPROFILE'}
891 0 4 if $ENV{'SYS$LOGIN'}
897 0 8 unless defined $dir
900 6 2 unless -e $path
903 0 2 unless my $hash = Storable::retrieve($path)
925 1 3 if exists $hash{$_[0]}
939 1 15 unless $self->check_url
944 0 15 unless my $url = "$link->[1]{'to'}"
947 11 4 if ($url =~ / \A https : /imsx)
949 0 11 unless ($ok)
951 0 0 unless $self->{'_ssl_warning'}
958 2 13 if $self->__ignore_url($url)
962 13 0 if ($self->cache_url_response) { }
969 11 2 if ($resp->{'success'}) { }
973 4 2 unless "CODE" eq ref $code
982 1 1 if $self->skip_server_errors and $resp->{'status'} =~ / \A 5 /msx
998 1 3 unless (exists $checked{$module})
1005 0 1 unless (eval { do { require $fn; $checked{$module} = 1; 1 } })
1010 0 4 unless $checked{$module}
1013 4 0 if (defined $version)
1026 3 17 unless -e $path and -T _
1029 16 1 if $path =~ / [.] (?: (?i: pl ) | pm | pod | t ) \z /msx
1031 0 1 unless open my $fh, "<", $path
1080 52 0 if defined $source
1089 791 0 if (my $code = $self->can('__token_' . $token->type))
1094 0 52 if $err and $self->any_errata_seen
1098 48 4 wantarray ? :
1108 0 90 unless defined $text
1119 180 81 if (defined(my $line = $token->attr("start_line")))
1123 48 213 if ('L' eq $tag) { }
2 211 elsif ('X' eq $tag) { }
36 175 elsif ($section_tag{$tag}) { }
1126 42 54 unless my $sect = $token->attr($name)
1144 2 267 if @{$attr->{'ignore_tag'};}
1155 36 225 if ($section_tag{$tag}) { }
2 446 elsif (@{$attr->{'ignore_tag'};} and $tag eq $attr->{'ignore_tag'}[-1]) { }