Branch Coverage

blib/lib/Pod/Site.pm
Criterion Covered Total %
branch 95 130 73.0


line true false branch
36 1 4 unless $params
44 1 4 if (my(@req) = grep({not $$self{$_};} 'doc_root', 'base_uri', 'module_roots'))
45 1 0 @req > 1 ? :
47 1 0 @req > 1 ? :
1 0 @req ? :
52 1 3 ref $$self{'module_roots'} eq 'ARRAY' ? :
56 1 3 unless -e $path
59 2 1 unless ref $$self{'base_uri'}
71 0 2 unless open my $idx_fh, '>', $idx_file
76 0 2 unless open my $toc_fh, '>', $toc_file
97 0 2 unless close $idx_fh
98 0 2 unless close $toc_fh
110 0 14 if ($name =~ /[.]p(?:m|od)$/) { }
0 14 elsif ($name =~ /[.](?:plx?|bat)$/) { }
119 14 0 if (open my $fh, '<', $path) { }
122 0 14 if ($shebang and $shebang =~ /^#!.*\bperl/) { }
149 0 2 if $self->verbose > 1
181 0 2 if $self->verbose > 1
220 0 22 if $self->verbose > 1
221 8 14 if (ref $data) { }
225 6 2 if ($$tree{"$key.pm"})
227 6 0 if (my $desc = $self->get_desc($class, $path))
235 0 8 if $self->verbose > 2
248 8 6 unless $$self{'seen'}{$class}
257 2 0 unless %{$files;}
275 0 2 if $self->verbose > 1
287 0 2 if $self->verbose > 1
298 0 2 if $self->verbose > 1
319 2 2 unless -e $dest and not $$self{"replace_$ext"}
329 0 16 unless open my $fh, '<', $file
334 36 504 unless /^=(?!cut)/ .. /^=cut/
335 50 454 unless $desc
336 500 4 unless $encoding
338 1 15 if $desc and $encoding
340 0 16 unless close $fh
341 0 16 if $$self{'verbose'} and not $desc
358 12 0 unless $$self{'name'}
363 1 1 $self->versioned_title ? :
1 1 $self->label ? :
371 2 2 $self->versioned_title ? :
376 4 1 if $$self{'version'}
379 0 1 unless my $file = 'Pod::Site::Search'->instance->name2path->{$mod}
381 0 1 unless my $info = 'Module::Build::ModuleInfo'->new_from_file($file)
411 0 13 unless Getopt::Long::GetOptions('name|n=s', \$opts{'name'}, 'doc-root|d=s', \$opts{'doc_root'}, 'base-uri|u=s@', \$opts{'base_uri'}, 'sample-module|s=s', \$opts{'sample_module'}, 'main-module|m=s', \$opts{'main_module'}, 'versioned-title|t!', \$opts{'versioned_title'}, 'label|l=s', \$opts{'label'}, 'index-file|i=s', \$opts{'index_file'}, 'css-path|c=s', \$opts{'css_path'}, 'js-path|j=s', \$opts{'js_path'}, 'replace-css', \$opts{'replace_css'}, 'replace-js', \$opts{'replace_js'}, 'verbose|V+', \$opts{'verbose'}, 'help|h', \$opts{'help'}, 'man|M', \$opts{'man'}, 'version|v', \$opts{'version'})
431 2 2 $opts{'man'} ? :
4 9 if $opts{'help'} or $opts{'man'}
437 0 13 if ($opts{'version'})
445 3 10 if (my(@missing) = map({(my $opt = $_) =~ s/_/-/g; "--$opt";} grep({not $opts{$_};} 'doc_root', 'base_uri')))
449 1 2 @missing > 1 ? :
451 0 1 @missing > 1 ? :
1 2 @missing ? :
457 1 12 unless @ARGV
463 1 11 unless m[/$]
470 10 4 if ($mod =~ /::/) { }
491 14 0 if $desc
494 0 14 if $$self{'verbose'} > 2
495 8 6 unless $no_link
500 0 14 if $$self{'verbose'} > 2
508 0 2 unless my $search = 'Pod::Site::Search'->instance
513 2 0 unless $$bins{$mod}
558 0 8 unless my $search = 'Pod::Site::Search'->instance
561 4 4 $to && $search->name2path->{$to} ? :
563 2 2 unless $url or $id and not $to
564 4 2 $id ? :
565 4 2 if $id