Branch Coverage

blib/lib/Pod/POM/Web.pm
Criterion Covered Total %
branch 121 220 55.0


line true false branch
86 0 1 if $package eq 'main' and $filename eq '-e'
99 0 0 unless my $daemon = 'HTTP::Daemon'->new('LocalPort', $port, 'ReuseAddr', 1)
121 0 0 if @ARGV
129 0 10 unless eval {
141 0 10 if (not $no_indexer and $class eq 'Pod::POM::Web')
146 0 10 if (/^Apache/)
159 10 0 if (/^HTTP/)
188 0 10 if $path_info =~ m[(\.\.|//|\\|:)]
190 1 9 unless $path_info =~ s[^/][]
192 1 8 if /^$/
193 1 7 if /^index$/
194 1 6 if /^toc$/
195 1 5 if m[^toc/(.*)$]
196 0 5 if m[^script/(.*)$]
197 2 3 if /^search$/
198 1 2 if m[^source/(.*)$]
201 0 2 if /^_dirs$/
204 1 1 if /\.(\w+)$/
218 0 3 $ini ? :
248 1 0 unless $params->{'print'}
250 0 1 unless my(@files) = $self->find_source($path)
259 1 0 $params->{'coloring'} ? :
266 0 1 $params->{'print'} ? :
274 0 1 $params->{'print'} ? :
280 0 1 $params->{'print'} ? :
311 0 1 unless my $fullpath = &firstval(sub {
331 0 1 unless my(@sources) = $self->find_source($path)
333 0 1 $path =~ /\bperltoc\b/ ? :
338 0 1 @sources > 1 ? :
347 0 1 if ($path =~ /\bperlfunc$/)
353 0 1 unless my $pom = $parser->parse_text($content)
363 0 1 if ($path =~ /\bperlfunc$/)
368 0 1 if ($path =~ /\bperl$/)
398 0 0 if -f $fullpath
402 0 0 unless $fullpath
412 0 0 unless my $pom = $parser->parse_text($content)
426 0 16 if ($path =~ s[^scripts/][])
430 0 0 unless -f "$dir/$path$ext"
443 16 140 if @found
458 0 11 unless my $pom = $parser->parse_text($content)
472 0 1 if /^perldocs$/
473 0 1 if /^pragmas$/
474 0 1 if /^scripts$/
479 0 1 if ($prefix eq 'Pod')
512 0 0 unless /^perl/
525 0 0 unless opendir my $dh, $dir
529 0 0 unless -x $_ and not -d $_ and -T $_
555 0 1 if ($prefix =~ /^([A-Z])\*/)
563 10 0 $prefix ? :
564 8 2 unless opendir my $dh, $dirname
566 4 11 if $name =~ /^\./
567 0 11 if $filter and not $name =~ /$filter/
572 0 11 if $is_dir and grep {m[^\Q$dirname/$name\E];} @search_dirs
574 11 0 if ($is_dir or $has_pod)
575 11 0 $prefix ? :
576 2 9 if $is_dir
577 9 2 if $has_pod
590 0 0 unless my($perlpod) = $self->find_source('perl', ':crlf')
593 0 0 unless my $perlpom = $parser->parse_text($source)
611 0 0 unless my $entry = delete $perldocs->{$ref}
624 0 0 if (keys %$perldocs)
644 2 7 if ($entry->{'dir'})
648 9 0 if ($entry->{'pod'})
669 0 1 $ini ? :
683 1 0 $no_indexer ? :
932 0 2 unless my $method = {'perlfunc', 'perlfunc', 'perlvar', 'perlvar', 'perlfaq', 'perlfaq', 'modules', 'serve_pod', 'fulltext', 'fulltext', 'modlist', 'modlist'}->{$source}
934 0 2 if ($method =~ /fulltext|modlist/ and $no_indexer)
950 1 1 unless (@_perlfunc_items)
951 0 1 unless my($funcpod) = $self->find_source('perlfunc')
965 0 1 unless my(@items) = grep({$_->title =~ /^$func\b/;} $self->perlfunc_items)
994 1 0 unless (@_perlvar_items)
997 0 1 unless my($varpod) = $self->find_source('perlvar')
1006 85 76 if ($item->content . '')
1019 0 0 unless my(@items) = grep({&any(sub {
1052 0 9 unless my($faqpod) = $self->find_source($faq)
1055 5 4 unless my(@questions) = map({grep {$_->title =~ /$regex/i;} $_->head2;} $faqpom->head1)
1123 10 0 ref $encoding ? :
1127 9 1 if $charset and $mime_type =~ /html/
1134 0 10 if (/^Apache/)
1138 0 0 if $args->{'mtime'}
1143 10 0 if (/^HTTP::Response/)
1147 3 7 if $args->{'mtime'}
1154 0 0 if $args->{'mtime'}
1175 9 34 $args{'href'} ? :
1179 0 43 if ($args{'abstract'})
1208 0 14 unless open my $fh, $file
1209 14 0 if $io_layer
1220 0 1 unless my $mm = 'Module::Metadata'->new_from_handle($fh, $mod_name)
1232 161 86 if /^item/
1233 20 66 if /^(pod|head|over)/
1279 10 25 if $link =~ s/^([^|]+)\|//
1289 34 1 unless $is_external_resource
1292 10 25 if ($link_text) { }
24 1 elsif (not $label =~ m[^\w+://]s) { }
1297 5 0 $1 ? :
1301 1 34 $is_external_resource ? :
1318 0 21 if $title =~ /^\s*\*\s*$/
1323 0 21 if ($title =~ /^AnnoCPAN/) { }
1332 21 0 if $title
1352 0 1 unless my $content = $pom->content->present($self)
1358 1 0 $name_h1 ? :
1371 1 0 if (my $mod_name = $self->{'mod_name'})
1374 1 0 $self->{'version'} ? :
1391 0 1 if ($has_cpan)
1393 0 0 if ($mod)
1396 0 0 if $cpan_version ne $self->{'version'}
1522 3 54 if ($coloring) { }
1534 1 56 if ($self->{'line_numbering'})
1548 3 0 if ($html) { }
1585 0 7 $node_content ? :