| 1 | # This code is part of Perl distribution OODoc version 3.05. | ||||||||||||||||||||||||||||
| 2 | # The POD got stripped from this file by OODoc version 3.05. | ||||||||||||||||||||||||||||
| 3 | # For contributors see file ChangeLog. | ||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | # This software is copyright (c) 2003-2025 by Mark Overmeer. | ||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | # This is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||||||||||
| 8 | # the same terms as the Perl 5 programming language system itself. | ||||||||||||||||||||||||||||
| 9 | # SPDX-License-Identifier: Artistic-1.0-Perl OR GPL-1.0-or-later | ||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | package OODoc::Format;{ | ||||||||||||||||||||||||||||
| 13 | 2 | our $VERSION = '3.05'; | |||||||||||||||||||||||||||
| 14 | } | ||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 2 | ▶ | use parent 'OODoc::Object'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 19 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | 2 | ▶ | use Log::Report 'oodoc'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 2 | ▶ | use OODoc::Manifest (); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 24 | 2 | ▶ | use Scalar::Util qw/weaken/; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | 2 | our %formatters = ( | |||||||||||||||||||||||||||
| 27 | pod => 'OODoc::Format::Pod', | ||||||||||||||||||||||||||||
| 28 | pod2 => 'OODoc::Format::Pod2', | ||||||||||||||||||||||||||||
| 29 | pod3 => 'OODoc::Format::Pod3', | ||||||||||||||||||||||||||||
| 30 | html => 'OODoc::Format::Html', | ||||||||||||||||||||||||||||
| 31 | html2 => 'OODoc::Format::Html2', # not (yet) included in the OODoc release | ||||||||||||||||||||||||||||
| 32 | ); | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | #-------------------- | ||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | sub new($%) | ||||||||||||||||||||||||||||
| 37 | 0 | ▶ | { my ($class, %args) = @_; | ||||||||||||||||||||||||||
|
Subroutine
new: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | 0 | ▶ | $class eq __PACKAGE__ | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 40 | or return $class->SUPER::new(%args); | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 0 | ▶ | my $format = $args{format} or error __x"no formatter specified"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 43 | 0 | ▶ | my $pkg = $formatters{$format} || $format; | ||||||||||||||||||||||||||
|
Condition0%0/3
$OODoc::Format::formatters{$format} || $format
MC/DC0%0/2
$OODoc::Format::formatters{$format} || $format
$OODoc::Format::formatters{$format}
$format
Truth table0%0/3
A || B
A= $OODoc::Format::formatters{$format}B= $format
| |||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | 0 | eval "require $pkg"; | |||||||||||||||||||||||||||
| 46 | 0 | ▶ | $@ and error __x"formatter {name} has compilation errors: {err}", name => $format, err => $@; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | 0 | $pkg->new(%args); | |||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||
| 51 | sub init($) | ||||||||||||||||||||||||||||
| 52 | 0 | ▶ | { my ($self, $args) = @_; | ||||||||||||||||||||||||||
|
Subroutine
init: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | 0 | ▶ | $self->SUPER::init($args) or return; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 55 | 0 | $self->{OF_format} = delete $args->{format}; | |||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | my $name = $self->{OF_project} = delete $args->{project} | ||||||||||||||||||||||||||||
| 58 | 0 | ▶ | or error __x"formatter knows no project name"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||
| 60 | $self->{OF_version} = delete $args->{version} | ||||||||||||||||||||||||||||
| 61 | 0 | ▶ | or error __x"formatter for {name} does not know the version", name => $name; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | $self->{OF_workdir} = delete $args->{workdir} | ||||||||||||||||||||||||||||
| 64 | 0 | ▶ | or error __x"no working directory specified for {name}", name => $name; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||
| 66 | 0 | ▶ | $self->{OF_manifest} = delete $args->{manifest} || OODoc::Manifest->new; | ||||||||||||||||||||||||||
|
Condition0%0/3
delete $args->{'manifest'} || 'OODoc::Manifest'->new
MC/DC0%0/2
delete $args->{'manifest'} || 'OODoc::Manifest'->new
delete $args->{'manifest'}
'OODoc::Manifest'->new
Truth table0%0/3
A || B
A= delete $args->{'manifest'}B= 'OODoc::Manifest'->new
| |||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||
| 68 | 0 | ▶ | $self->{OF_index} = delete $args->{index} or error __x"no index specified"; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 69 | 0 | weaken($self->{OF_index}); | |||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||
| 71 | 0 | $self; | |||||||||||||||||||||||||||
| 72 | } | ||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||
| 74 | 0 | ▶ | sub publish { panic } | ||||||||||||||||||||||||||
|
Subroutine
publish: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||
| 76 | #-------------------- | ||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||
| 78 | 0 | ▶ | sub project() { $_[0]->{OF_project} } | ||||||||||||||||||||||||||
|
Subroutine
project: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||
| 81 | 0 | ▶ | sub version() { $_[0]->{OF_version} } | ||||||||||||||||||||||||||
|
Subroutine
version: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 82 | 0 | ▶ | sub workdir() { $_[0]->{OF_workdir} } | ||||||||||||||||||||||||||
|
Subroutine
workdir: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 83 | 0 | ▶ | sub manifest() { $_[0]->{OF_manifest} } | ||||||||||||||||||||||||||
|
Subroutine
manifest: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 84 | 0 | ▶ | sub format() { $_[0]->{OF_format} } | ||||||||||||||||||||||||||
|
Subroutine
format: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 85 | 0 | ▶ | sub index() { $_[0]->{OF_index} } | ||||||||||||||||||||||||||
|
Subroutine
index: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||
| 87 | #-------------------- | ||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||
| 89 | sub createPages(%) | ||||||||||||||||||||||||||||
| 90 | 0 | ▶ | { my ($self, %args) = @_; | ||||||||||||||||||||||||||
|
Subroutine
createPages: not called CC=8 SCAR=42.8
Pod
documented
| |||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||
| 92 | 0 | ▶ | my $sel = $args{select} || sub { 1 }; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
Condition0%0/3
$args{'select'} || sub {
1;
}
MC/DC0%0/2
$args{'select'} || sub {
1;
}
$args{'select'}
sub {
1;
}
Truth table0%0/3
A || B
A= $args{'select'}B= sub {
1;
}
| |||||||||||||||||||||||||||||
| 93 | 0 | ▶ | my $select = ref $sel eq 'CODE' ? $sel : sub { $_[0]->name =~ $sel }; | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||
| 95 | # Manual knowledge is global | ||||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||
| 97 | 0 | ▶ | my $options = $args{manual_format} || []; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{'manual_format'} || []
MC/DC0%0/1
$args{'manual_format'} || []
$args{'manual_format'}
Truth table0%0/2
A
A= $args{'manual_format'}
| |||||||||||||||||||||||||||||
| 98 | 0 | my $index = $self->index; | |||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||
| 100 | 0 | foreach my $package (sort $index->packageNames) | |||||||||||||||||||||||||||
| 101 | { | ||||||||||||||||||||||||||||
| 102 | 0 | foreach my $manual ($index->manualsForPackage($package)) | |||||||||||||||||||||||||||
| 103 | 0 | ▶ | { $select->($manual) or next; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||
| 105 | 0 | ▶ | unless($manual->chapters) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 106 | 0 | { trace " skipping $manual: no chapters"; | |||||||||||||||||||||||||||
| 107 | 0 | next; | |||||||||||||||||||||||||||
| 108 | } | ||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||
| 110 | 0 | trace " creating manual $manual with ".(ref $self); | |||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||
| 112 | $self->createManual( | ||||||||||||||||||||||||||||
| 113 | manual => $manual, | ||||||||||||||||||||||||||||
| 114 | template => $args{manual_templates}, | ||||||||||||||||||||||||||||
| 115 | append => $args{append}, | ||||||||||||||||||||||||||||
| 116 | 0 | @$options | |||||||||||||||||||||||||||
| 117 | ); | ||||||||||||||||||||||||||||
| 118 | } | ||||||||||||||||||||||||||||
| 119 | } | ||||||||||||||||||||||||||||
| 120 | |||||||||||||||||||||||||||||
| 121 | # | ||||||||||||||||||||||||||||
| 122 | # Create other pages | ||||||||||||||||||||||||||||
| 123 | # | ||||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||
| 125 | 0 | trace "creating other pages"; | |||||||||||||||||||||||||||
| 126 | 0 | $self->createOtherPages(source => $args{other_templates}, process => $args{process_files}); | |||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||
| 128 | 0 | 1; | |||||||||||||||||||||||||||
| 129 | } | ||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||
| 131 | |||||||||||||||||||||||||||||
| 132 | 0 | ▶ | sub createManual(@) {panic} | ||||||||||||||||||||||||||
|
Subroutine
createManual: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||
| 134 | |||||||||||||||||||||||||||||
| 135 | 0 | ▶ | sub cleanup($$%) { ... } | ||||||||||||||||||||||||||
|
Subroutine
cleanup: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||
| 138 | 0 | ▶ | sub cleanupString($$%) { shift->cleanup(@_) } | ||||||||||||||||||||||||||
|
Subroutine
cleanupString: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||
| 140 | |||||||||||||||||||||||||||||
| 141 | sub showChapter(@) | ||||||||||||||||||||||||||||
| 142 | 0 | ▶ | { my ($self, %args) = @_; | ||||||||||||||||||||||||||
|
Subroutine
showChapter: not called CC=26 SCAR=65.5
Pod
documented
| |||||||||||||||||||||||||||||
| 143 | 0 | ▶ | my $chapter = $args{chapter} or panic; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 144 | 0 | ▶ | my $manual = $args{manual} or panic; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||
| 146 | 0 | my $show_inh = $args{show_inherited}; | |||||||||||||||||||||||||||
| 147 | 0 | ▶ | my $show_ch = $args{show_inherited_chapter} || $show_inh; | ||||||||||||||||||||||||||
|
Condition0%0/3
$args{'show_inherited_chapter'} || $show_inh
MC/DC0%0/2
$args{'show_inherited_chapter'} || $show_inh
$args{'show_inherited_chapter'}
$show_inh
Truth table0%0/3
A || B
A= $args{'show_inherited_chapter'}B= $show_inh
| |||||||||||||||||||||||||||||
| 148 | 0 | ▶ | my $show_sec = $args{show_inherited_section} || $show_inh; | ||||||||||||||||||||||||||
|
Condition0%0/3
$args{'show_inherited_section'} || $show_inh
MC/DC0%0/2
$args{'show_inherited_section'} || $show_inh
$args{'show_inherited_section'}
$show_inh
Truth table0%0/3
A || B
A= $args{'show_inherited_section'}B= $show_inh
| |||||||||||||||||||||||||||||
| 149 | 0 | ▶ | my $show_ssec = $args{show_inherited_subsection} || $show_inh; | ||||||||||||||||||||||||||
|
Condition0%0/3
$args{'show_inherited_subsection'} || $show_inh
MC/DC0%0/2
$args{'show_inherited_subsection'} || $show_inh
$args{'show_inherited_subsection'}
$show_inh
Truth table0%0/3
A || B
A= $args{'show_inherited_subsection'}B= $show_inh
| |||||||||||||||||||||||||||||
| 150 | 0 | ▶ | my $show_sssec = $args{show_inherited_subsubsection} || $show_inh; | ||||||||||||||||||||||||||
|
Condition0%0/3
$args{'show_inherited_subsubsection'} || $show_inh
MC/DC0%0/2
$args{'show_inherited_subsubsection'} || $show_inh
$args{'show_inherited_subsubsection'}
$show_inh
Truth table0%0/3
A || B
A= $args{'show_inherited_subsubsection'}B= $show_inh
| |||||||||||||||||||||||||||||
| 151 | |||||||||||||||||||||||||||||
| 152 | 0 | ▶ | my $show_examples = $args{show_examples} || 'EXPAND'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{'show_examples'} || 'EXPAND'
MC/DC0%0/1
$args{'show_examples'} || 'EXPAND'
$args{'show_examples'}
Truth table0%0/2
A
A= $args{'show_examples'}
| |||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||
| 154 | 0 | ▶ | if($manual->inherited($chapter)) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 155 | 0 | ▶ | { return $self if $show_ch eq 'NO'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 156 | 0 | $self->showStructureRefer(%args, structure => $chapter); | |||||||||||||||||||||||||||
| 157 | 0 | return $self; | |||||||||||||||||||||||||||
| 158 | } | ||||||||||||||||||||||||||||
| 159 | |||||||||||||||||||||||||||||
| 160 | $self->showStructureExpanded(%args, structure => $chapter, | ||||||||||||||||||||||||||||
| 161 | 0 | ▶ | show_examples => $args{show_chapter_examples} || $show_examples, | ||||||||||||||||||||||||||
|
Condition0%0/3
$args{'show_chapter_examples'} || $show_examples
MC/DC0%0/2
$args{'show_chapter_examples'} || $show_examples
$args{'show_chapter_examples'}
$show_examples
Truth table0%0/3
A || B
A= $args{'show_chapter_examples'}B= $show_examples
| |||||||||||||||||||||||||||||
| 162 | ); | ||||||||||||||||||||||||||||
| 163 | |||||||||||||||||||||||||||||
| 164 | 0 | foreach my $section ($chapter->sections) | |||||||||||||||||||||||||||
| 165 | 0 | ▶ | { if($manual->inherited($section)) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 166 | 0 | ▶ | { next if $show_sec eq 'NO'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 167 | 0 | ▶ | if($show_sec ne 'REFER') | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 168 | 0 | { $self->showStructureRefer(%args, structure => $section); | |||||||||||||||||||||||||||
| 169 | 0 | next; | |||||||||||||||||||||||||||
| 170 | } | ||||||||||||||||||||||||||||
| 171 | } | ||||||||||||||||||||||||||||
| 172 | |||||||||||||||||||||||||||||
| 173 | $self->showStructureExpanded(%args, structure => $section, | ||||||||||||||||||||||||||||
| 174 | 0 | ▶ | show_examples => $args{show_section_examples} || $show_examples, | ||||||||||||||||||||||||||
|
Condition0%0/3
$args{'show_section_examples'} || $show_examples
MC/DC0%0/2
$args{'show_section_examples'} || $show_examples
$args{'show_section_examples'}
$show_examples
Truth table0%0/3
A || B
A= $args{'show_section_examples'}B= $show_examples
| |||||||||||||||||||||||||||||
| 175 | ); | ||||||||||||||||||||||||||||
| 176 | |||||||||||||||||||||||||||||
| 177 | 0 | foreach my $subsection ($section->subsections) | |||||||||||||||||||||||||||
| 178 | 0 | ▶ | { if($manual->inherited($subsection)) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 179 | 0 | ▶ | { next if $show_ssec eq 'NO'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 180 | 0 | ▶ | if($show_ssec ne 'REFER') | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 181 | 0 | { $self->showStructureRefer(%args, structure => $subsection); | |||||||||||||||||||||||||||
| 182 | 0 | next; | |||||||||||||||||||||||||||
| 183 | } | ||||||||||||||||||||||||||||
| 184 | } | ||||||||||||||||||||||||||||
| 185 | |||||||||||||||||||||||||||||
| 186 | $self->showStructureExpanded(%args, structure => $subsection, | ||||||||||||||||||||||||||||
| 187 | 0 | ▶ | show_examples => $args{show_subsection_examples} || $show_examples, | ||||||||||||||||||||||||||
|
Condition0%0/3
$args{'show_subsection_examples'} || $show_examples
MC/DC0%0/2
$args{'show_subsection_examples'} || $show_examples
$args{'show_subsection_examples'}
$show_examples
Truth table0%0/3
A || B
A= $args{'show_subsection_examples'}B= $show_examples
| |||||||||||||||||||||||||||||
| 188 | ); | ||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||
| 190 | 0 | foreach my $subsubsection ($subsection->subsubsections) | |||||||||||||||||||||||||||
| 191 | 0 | ▶ | { if($manual->inherited($subsubsection)) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 192 | 0 | ▶ | { next if $show_sssec eq 'NO'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 193 | 0 | ▶ | if($show_sssec ne 'REFER') | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 194 | 0 | { $self->showStructureRefer(%args, structure => $subsubsection); | |||||||||||||||||||||||||||
| 195 | 0 | next; | |||||||||||||||||||||||||||
| 196 | } | ||||||||||||||||||||||||||||
| 197 | } | ||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||
| 199 | $self->showStructureExpanded(%args, structure => $subsubsection, | ||||||||||||||||||||||||||||
| 200 | 0 | ▶ | show_examples => $args{show_subsubsection_examples} || $show_examples, | ||||||||||||||||||||||||||
|
Condition0%0/3
$args{'show_subsubsection_examples'} || $show_examples
MC/DC0%0/2
$args{'show_subsubsection_examples'} || $show_examples
$args{'show_subsubsection_examples'}
$show_examples
Truth table0%0/3
A || B
A= $args{'show_subsubsection_examples'}B= $show_examples
| |||||||||||||||||||||||||||||
| 201 | ); | ||||||||||||||||||||||||||||
| 202 | } | ||||||||||||||||||||||||||||
| 203 | } | ||||||||||||||||||||||||||||
| 204 | } | ||||||||||||||||||||||||||||
| 205 | } | ||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||
| 207 | |||||||||||||||||||||||||||||
| 208 | 0 | ▶ | sub showStructureExpanded(@) {panic} | ||||||||||||||||||||||||||
|
Subroutine
showStructureExpanded: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||
| 210 | |||||||||||||||||||||||||||||
| 211 | 0 | ▶ | sub showStructureRefer(@) {panic} | ||||||||||||||||||||||||||
|
Subroutine
showStructureRefer: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 212 | |||||||||||||||||||||||||||||
| 213 | 0 | ▶ | sub chapterName(@) { $_[0]->showRequiredChapter(NAME => @_) } | ||||||||||||||||||||||||||
|
Subroutine
chapterName: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 214 | 0 | ▶ | sub chapterSynopsis(@) { $_[0]->showOptionalChapter(SYNOPSIS => @_) } | ||||||||||||||||||||||||||
|
Subroutine
chapterSynopsis: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 215 | 0 | ▶ | sub chapterInheritance(@) { $_[0]->showOptionalChapter(INHERITANCE => @_) } | ||||||||||||||||||||||||||
|
Subroutine
chapterInheritance: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 216 | 0 | ▶ | sub chapterDescription(@) { $_[0]->showRequiredChapter(DESCRIPTION => @_) } | ||||||||||||||||||||||||||
|
Subroutine
chapterDescription: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 217 | 0 | ▶ | sub chapterOverloaded(@) { $_[0]->showOptionalChapter(OVERLOADED => @_) } | ||||||||||||||||||||||||||
|
Subroutine
chapterOverloaded: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 218 | 0 | ▶ | sub chapterMethods(@) { $_[0]->showOptionalChapter(METHODS => @_) } | ||||||||||||||||||||||||||
|
Subroutine
chapterMethods: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 219 | 0 | ▶ | sub chapterExports(@) { $_[0]->showOptionalChapter(EXPORTS => @_) } | ||||||||||||||||||||||||||
|
Subroutine
chapterExports: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 220 | 0 | ▶ | sub chapterDiagnostics(@) { $_[0]->showOptionalChapter(DIAGNOSTICS => @_) } | ||||||||||||||||||||||||||
|
Subroutine
chapterDiagnostics: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 221 | 0 | ▶ | sub chapterDetails(@) { $_[0]->showOptionalChapter(DETAILS => @_) } | ||||||||||||||||||||||||||
|
Subroutine
chapterDetails: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 222 | 0 | ▶ | sub chapterReferences(@) { $_[0]->showOptionalChapter(REFERENCES => @_) } | ||||||||||||||||||||||||||
|
Subroutine
chapterReferences: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 223 | 0 | ▶ | sub chapterCopyrights(@) { $_[0]->showOptionalChapter(COPYRIGHTS => @_) } | ||||||||||||||||||||||||||
|
Subroutine
chapterCopyrights: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 224 | |||||||||||||||||||||||||||||
| 225 | |||||||||||||||||||||||||||||
| 226 | sub showRequiredChapter($%) | ||||||||||||||||||||||||||||
| 227 | 0 | ▶ | { my ($self, $name, %args) = @_; | ||||||||||||||||||||||||||
|
Subroutine
showRequiredChapter: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 228 | 0 | ▶ | my $manual = $args{manual} or panic; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 229 | |||||||||||||||||||||||||||||
| 230 | 0 | ▶ | my $chapter = $manual->chapter($name) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 231 | or (error __x"missing required chapter {name} in {manual}", name => $name, manual => $manual), return; | ||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||
| 233 | 0 | $self->showChapter(chapter => $chapter, %args); | |||||||||||||||||||||||||||
| 234 | } | ||||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||
| 236 | |||||||||||||||||||||||||||||
| 237 | sub showOptionalChapter($@) | ||||||||||||||||||||||||||||
| 238 | 0 | ▶ | { my ($self, $name, %args) = @_; | ||||||||||||||||||||||||||
|
Subroutine
showOptionalChapter: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 239 | 0 | ▶ | my $manual = $args{manual} or panic; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 240 | 0 | ▶ | my $chapter = $manual->chapter($name) or return; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 241 | 0 | $self->showChapter(chapter => $chapter, %args); | |||||||||||||||||||||||||||
| 242 | } | ||||||||||||||||||||||||||||
| 243 | |||||||||||||||||||||||||||||
| 244 | |||||||||||||||||||||||||||||
| 245 | 0 | ▶ | sub createOtherPages(@) { $_[0] } | ||||||||||||||||||||||||||
|
Subroutine
createOtherPages: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 246 | |||||||||||||||||||||||||||||
| 247 | |||||||||||||||||||||||||||||
| 248 | sub showSubroutines(@) | ||||||||||||||||||||||||||||
| 249 | 0 | ▶ | { my ($self, %args) = @_; | ||||||||||||||||||||||||||
|
Subroutine
showSubroutines: not called CC=15 SCAR=54.8
Pod
documented
| |||||||||||||||||||||||||||||
| 250 | |||||||||||||||||||||||||||||
| 251 | 0 | ▶ | my @subs = $args{subroutines} ? sort @{$args{subroutines}} : []; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 252 | 0 | ▶ | @subs or return $self; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 253 | |||||||||||||||||||||||||||||
| 254 | 0 | ▶ | my $manual = $args{manual} or panic; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 255 | 0 | ▶ | my $output = $args{output} || select; | ||||||||||||||||||||||||||
|
Condition0%0/3
$args{'output'} || select()
MC/DC0%0/2
$args{'output'} || select()
$args{'output'}
select()
Truth table0%0/3
A || B
A= $args{'output'}B= select()
| |||||||||||||||||||||||||||||
| 256 | |||||||||||||||||||||||||||||
| 257 | # list is also in ::Pod3 | ||||||||||||||||||||||||||||
| 258 | 0 | ▶ | $args{show_described_options} ||= 'EXPAND'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{"show_described_options"} ||= "EXPAND"
MC/DC0%0/1
$args{"show_described_options"} ||= "EXPAND"
$args{"show_described_options"}
Truth table0%0/2
A
A= $args{"show_described_options"}
| |||||||||||||||||||||||||||||
| 259 | 0 | ▶ | $args{show_described_subs} ||= 'EXPAND'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{"show_described_subs"} ||= "EXPAND"
MC/DC0%0/1
$args{"show_described_subs"} ||= "EXPAND"
$args{"show_described_subs"}
Truth table0%0/2
A
A= $args{"show_described_subs"}
| |||||||||||||||||||||||||||||
| 260 | 0 | ▶ | $args{show_diagnostics} ||= 'NO'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{"show_diagnostics"} ||= "NO"
MC/DC0%0/1
$args{"show_diagnostics"} ||= "NO"
$args{"show_diagnostics"}
Truth table0%0/2
A
A= $args{"show_diagnostics"}
| |||||||||||||||||||||||||||||
| 261 | 0 | ▶ | $args{show_examples} ||= 'EXPAND'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{"show_examples"} ||= "EXPAND"
MC/DC0%0/1
$args{"show_examples"} ||= "EXPAND"
$args{"show_examples"}
Truth table0%0/2
A
A= $args{"show_examples"}
| |||||||||||||||||||||||||||||
| 262 | 0 | ▶ | $args{show_inherited_options} ||= 'USE'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{"show_inherited_options"} ||= "USE"
MC/DC0%0/1
$args{"show_inherited_options"} ||= "USE"
$args{"show_inherited_options"}
Truth table0%0/2
A
A= $args{"show_inherited_options"}
| |||||||||||||||||||||||||||||
| 263 | 0 | ▶ | $args{show_inherited_subs} ||= 'USE'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{"show_inherited_subs"} ||= "USE"
MC/DC0%0/1
$args{"show_inherited_subs"} ||= "USE"
$args{"show_inherited_subs"}
Truth table0%0/2
A
A= $args{"show_inherited_subs"}
| |||||||||||||||||||||||||||||
| 264 | 0 | ▶ | $args{show_option_table} ||= 'ALL'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{"show_option_table"} ||= "ALL"
MC/DC0%0/1
$args{"show_option_table"} ||= "ALL"
$args{"show_option_table"}
Truth table0%0/2
A
A= $args{"show_option_table"}
| |||||||||||||||||||||||||||||
| 265 | 0 | ▶ | $args{show_subs_index} ||= 'NO'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{"show_subs_index"} ||= "NO"
MC/DC0%0/1
$args{"show_subs_index"} ||= "NO"
$args{"show_subs_index"}
Truth table0%0/2
A
A= $args{"show_subs_index"}
| |||||||||||||||||||||||||||||
| 266 | |||||||||||||||||||||||||||||
| 267 | 0 | $self->showSubsIndex(%args, subroutines => \@subs); | |||||||||||||||||||||||||||
| 268 | |||||||||||||||||||||||||||||
| 269 | 0 | ▶ | for(my $index=0; $index<@subs; $index++) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 270 | 0 | { my $subroutine = $subs[$index]; | |||||||||||||||||||||||||||
| 271 | 0 | ▶ | my $show = $manual->inherited($subroutine) ? $args{show_inherited_subs} : $args{show_described_subs}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 272 | |||||||||||||||||||||||||||||
| 273 | 0 | $self->showSubroutine( | |||||||||||||||||||||||||||
| 274 | %args, | ||||||||||||||||||||||||||||
| 275 | subroutine => $subroutine, | ||||||||||||||||||||||||||||
| 276 | show_subroutine => $show, | ||||||||||||||||||||||||||||
| 277 | last => ($index==$#subs), | ||||||||||||||||||||||||||||
| 278 | ); | ||||||||||||||||||||||||||||
| 279 | } | ||||||||||||||||||||||||||||
| 280 | } | ||||||||||||||||||||||||||||
| 281 | |||||||||||||||||||||||||||||
| 282 | |||||||||||||||||||||||||||||
| 283 | sub showSubroutine(@) | ||||||||||||||||||||||||||||
| 284 | 0 | ▶ | { my ($self, %args) = @_; | ||||||||||||||||||||||||||
|
Subroutine
showSubroutine: not called CC=39 SCAR=73.5
Pod
documented
| |||||||||||||||||||||||||||||
| 285 | |||||||||||||||||||||||||||||
| 286 | 0 | ▶ | my $subroutine = $args{subroutine} or panic; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 287 | 0 | ▶ | my $manual = $args{manual} or panic; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 288 | 0 | ▶ | my $output = $args{output} || select; | ||||||||||||||||||||||||||
|
Condition0%0/3
$args{'output'} || select()
MC/DC0%0/2
$args{'output'} || select()
$args{'output'}
select()
Truth table0%0/3
A || B
A= $args{'output'}B= select()
| |||||||||||||||||||||||||||||
| 289 | |||||||||||||||||||||||||||||
| 290 | # | ||||||||||||||||||||||||||||
| 291 | # Method use | ||||||||||||||||||||||||||||
| 292 | # | ||||||||||||||||||||||||||||
| 293 | |||||||||||||||||||||||||||||
| 294 | 0 | ▶ | my $use = $args{show_subroutine} || 'EXPAND'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{'show_subroutine'} || 'EXPAND'
MC/DC0%0/1
$args{'show_subroutine'} || 'EXPAND'
$args{'show_subroutine'}
Truth table0%0/2
A
A= $args{'show_subroutine'}
| |||||||||||||||||||||||||||||
| 295 | 0 | ▶ | my ($show_use, $expand) | ||||||||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||||||||
| 296 | = $use eq 'EXPAND' ? ('showSubroutineUse', 1) | ||||||||||||||||||||||||||||
| 297 | : $use eq 'USE' ? ('showSubroutineUse', 0) | ||||||||||||||||||||||||||||
| 298 | : $use eq 'NAMES' ? ('showSubroutineName', 0) | ||||||||||||||||||||||||||||
| 299 | : $use eq 'NO' ? (undef, 0) | ||||||||||||||||||||||||||||
| 300 | : error __x"illegal value for show_subroutine: {value}", value => $use; | ||||||||||||||||||||||||||||
| 301 | |||||||||||||||||||||||||||||
| 302 | 0 | ▶ | $self->$show_use(%args, subroutine => $subroutine) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 303 | if defined $show_use; | ||||||||||||||||||||||||||||
| 304 | |||||||||||||||||||||||||||||
| 305 | 0 | ▶ | $expand or return; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 306 | |||||||||||||||||||||||||||||
| 307 | 0 | ▶ | $args{show_inherited_options} ||= 'USE'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{"show_inherited_options"} ||= "USE"
MC/DC0%0/1
$args{"show_inherited_options"} ||= "USE"
$args{"show_inherited_options"}
Truth table0%0/2
A
A= $args{"show_inherited_options"}
| |||||||||||||||||||||||||||||
| 308 | 0 | ▶ | $args{show_described_options} ||= 'EXPAND'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{"show_described_options"} ||= "EXPAND"
MC/DC0%0/1
$args{"show_described_options"} ||= "EXPAND"
$args{"show_described_options"}
Truth table0%0/2
A
A= $args{"show_described_options"}
| |||||||||||||||||||||||||||||
| 309 | |||||||||||||||||||||||||||||
| 310 | # | ||||||||||||||||||||||||||||
| 311 | # Subroutine descriptions | ||||||||||||||||||||||||||||
| 312 | # | ||||||||||||||||||||||||||||
| 313 | |||||||||||||||||||||||||||||
| 314 | 0 | ▶ | my $descr = $args{show_sub_description} || 'DESCRIBED'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{'show_sub_description'} || 'DESCRIBED'
MC/DC0%0/1
$args{'show_sub_description'} || 'DESCRIBED'
$args{'show_sub_description'}
Truth table0%0/2
A
A= $args{'show_sub_description'}
| |||||||||||||||||||||||||||||
| 315 | 0 | my $description = $subroutine->findDescriptionObject; | |||||||||||||||||||||||||||
| 316 | 0 | my $show_descr = 'showSubroutineDescription'; | |||||||||||||||||||||||||||
| 317 | |||||||||||||||||||||||||||||
| 318 | 0 | ▶ | if($descr eq 'NO') { $show_descr = undef } | ||||||||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||||||||
| 319 | elsif($descr eq 'REFER') | ||||||||||||||||||||||||||||
| 320 | 0 | ▶ | { $show_descr = 'showSubroutineDescriptionRefer' | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$description and $manual->inherited($description)
MC/DC0%0/2
$description and $manual->inherited($description)
$description
$manual->inherited($description)
Truth table0%0/3
A and B
A= $descriptionB= $manual->inherited($description)
| |||||||||||||||||||||||||||||
| 321 | if $description && $manual->inherited($description); | ||||||||||||||||||||||||||||
| 322 | } | ||||||||||||||||||||||||||||
| 323 | elsif($descr eq 'DESCRIBED') | ||||||||||||||||||||||||||||
| 324 | 0 | ▶ | { $show_descr = 'showSubroutineDescriptionRefer' | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$description and $manual->inherited($description)
MC/DC0%0/2
$description and $manual->inherited($description)
$description
$manual->inherited($description)
Truth table0%0/3
A and B
A= $descriptionB= $manual->inherited($description)
| |||||||||||||||||||||||||||||
| 325 | if $description && $manual->inherited($description); | ||||||||||||||||||||||||||||
| 326 | } | ||||||||||||||||||||||||||||
| 327 | elsif($descr eq 'ALL') {;} | ||||||||||||||||||||||||||||
| 328 | 0 | else { error __x"illegal value for show_sub_description: {value}", value => $descr} | |||||||||||||||||||||||||||
| 329 | |||||||||||||||||||||||||||||
| 330 | 0 | ▶ | $self->$show_descr(%args, subroutine => $description // $subroutine) | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$description // $subroutine
MC/DC0%0/2
$description // $subroutine
$description
$subroutine
Truth table0%0/3
A // B
A= $descriptionB= $subroutine
| |||||||||||||||||||||||||||||
| 331 | if defined $show_descr; | ||||||||||||||||||||||||||||
| 332 | |||||||||||||||||||||||||||||
| 333 | # | ||||||||||||||||||||||||||||
| 334 | # Options | ||||||||||||||||||||||||||||
| 335 | # | ||||||||||||||||||||||||||||
| 336 | |||||||||||||||||||||||||||||
| 337 | 0 | my $options = $subroutine->collectedOptions; | |||||||||||||||||||||||||||
| 338 | |||||||||||||||||||||||||||||
| 339 | 0 | ▶ | my $opttab = $args{show_option_table} || 'NAMES'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{'show_option_table'} || 'NAMES'
MC/DC0%0/1
$args{'show_option_table'} || 'NAMES'
$args{'show_option_table'}
Truth table0%0/2
A
A= $args{'show_option_table'}
| |||||||||||||||||||||||||||||
| 340 | 0 | my @options = @{$options}{ sort keys %$options }; | |||||||||||||||||||||||||||
| 341 | |||||||||||||||||||||||||||||
| 342 | # Option table | ||||||||||||||||||||||||||||
| 343 | |||||||||||||||||||||||||||||
| 344 | my @opttab | ||||||||||||||||||||||||||||
| 345 | 0 | ▶ | = $opttab eq 'NO' ? () | ||||||||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||||||||
| 346 | : $opttab eq 'DESCRIBED'? (grep not $manual->inherits($_->[0]), @options) | ||||||||||||||||||||||||||||
| 347 | : $opttab eq 'INHERITED'? (grep $manual->inherits($_->[0]), @options) | ||||||||||||||||||||||||||||
| 348 | : $opttab eq 'ALL' ? @options | ||||||||||||||||||||||||||||
| 349 | : error __x"illegal value for show_option_table: {value}", value => $opttab; | ||||||||||||||||||||||||||||
| 350 | |||||||||||||||||||||||||||||
| 351 | 0 | ▶ | $self->showOptionTable(%args, options => \@opttab) if @opttab; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 352 | |||||||||||||||||||||||||||||
| 353 | # Option expanded | ||||||||||||||||||||||||||||
| 354 | |||||||||||||||||||||||||||||
| 355 | 0 | my @optlist; | |||||||||||||||||||||||||||
| 356 | 0 | foreach (@options) | |||||||||||||||||||||||||||
| 357 | 0 | { my ($option, $default) = @$_; | |||||||||||||||||||||||||||
| 358 | 0 | ▶ | my $check = $manual->inherited($option) ? $args{show_inherited_options} : $args{show_described_options}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 359 | 0 | ▶ | push @optlist, $_ if $check eq 'USE' || $check eq 'EXPAND'; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$check eq "USE" or $check eq "EXPAND"
MC/DC0%0/2
$check eq "USE" or $check eq "EXPAND"
$check eq "USE"
$check eq "EXPAND"
Truth table0%0/3
A or B
A= $check eq "USE"B= $check eq "EXPAND"
| |||||||||||||||||||||||||||||
| 360 | } | ||||||||||||||||||||||||||||
| 361 | |||||||||||||||||||||||||||||
| 362 | 0 | ▶ | $self->showOptions(%args, options => \@optlist) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 363 | if @optlist; | ||||||||||||||||||||||||||||
| 364 | |||||||||||||||||||||||||||||
| 365 | # Examples | ||||||||||||||||||||||||||||
| 366 | |||||||||||||||||||||||||||||
| 367 | 0 | my @examples = $subroutine->examples; | |||||||||||||||||||||||||||
| 368 | 0 | ▶ | my $show_ex = $args{show_examples} || 'EXPAND'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{'show_examples'} || 'EXPAND'
MC/DC0%0/1
$args{'show_examples'} || 'EXPAND'
$args{'show_examples'}
Truth table0%0/2
A
A= $args{'show_examples'}
| |||||||||||||||||||||||||||||
| 369 | 0 | ▶ | $self->showExamples(%args, examples => \@examples) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 370 | if $show_ex eq 'EXPAND'; | ||||||||||||||||||||||||||||
| 371 | |||||||||||||||||||||||||||||
| 372 | # Diagnostics | ||||||||||||||||||||||||||||
| 373 | |||||||||||||||||||||||||||||
| 374 | 0 | my @diags = $subroutine->diagnostics; | |||||||||||||||||||||||||||
| 375 | 0 | ▶ | my $show_diag= $args{show_diagnostics} || 'NO'; | ||||||||||||||||||||||||||
|
Condition0%0/2
$args{'show_diagnostics'} || 'NO'
MC/DC0%0/1
$args{'show_diagnostics'} || 'NO'
$args{'show_diagnostics'}
Truth table0%0/2
A
A= $args{'show_diagnostics'}
| |||||||||||||||||||||||||||||
| 376 | 0 | ▶ | $self->showDiagnostics(%args, diagnostics => \@diags) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 377 | if $show_diag eq 'EXPAND'; | ||||||||||||||||||||||||||||
| 378 | } | ||||||||||||||||||||||||||||
| 379 | |||||||||||||||||||||||||||||
| 380 | |||||||||||||||||||||||||||||
| 381 | 0 | ▶ | sub showExamples(@) { $_[0] } | ||||||||||||||||||||||||||
|
Subroutine
showExamples: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 382 | |||||||||||||||||||||||||||||
| 383 | |||||||||||||||||||||||||||||
| 384 | 0 | ▶ | sub showSubroutineUse(@) { $_[0] } | ||||||||||||||||||||||||||
|
Subroutine
showSubroutineUse: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 385 | |||||||||||||||||||||||||||||
| 386 | |||||||||||||||||||||||||||||
| 387 | 0 | ▶ | sub showSubroutineName(@) { $_[0] } | ||||||||||||||||||||||||||
|
Subroutine
showSubroutineName: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 388 | |||||||||||||||||||||||||||||
| 389 | |||||||||||||||||||||||||||||
| 390 | 0 | ▶ | sub showSubroutineDescription(@) { $_[0] } | ||||||||||||||||||||||||||
|
Subroutine
showSubroutineDescription: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 391 | |||||||||||||||||||||||||||||
| 392 | |||||||||||||||||||||||||||||
| 393 | sub showOptionTable(@) | ||||||||||||||||||||||||||||
| 394 | 0 | ▶ | { my ($self, %args) = @_; | ||||||||||||||||||||||||||
|
Subroutine
showOptionTable: not called CC=8 SCAR=42.8
Pod
documented
| |||||||||||||||||||||||||||||
| 395 | 0 | ▶ | my $options = $args{options} or panic; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 396 | 0 | ▶ | my $manual = $args{manual} or panic; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 397 | 0 | ▶ | my $output = $args{output} or panic; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 398 | |||||||||||||||||||||||||||||
| 399 | 0 | my @rows; | |||||||||||||||||||||||||||
| 400 | 0 | foreach (@$options) | |||||||||||||||||||||||||||
| 401 | 0 | { my ($option, $default) = @$_; | |||||||||||||||||||||||||||
| 402 | 0 | my $optman = $option->manual; | |||||||||||||||||||||||||||
| 403 | 0 | ▶ | push @rows, [ | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 404 | $self->cleanupString($manual, $option->name, tag => 'option_name'), | ||||||||||||||||||||||||||||
| 405 | ($manual->inherited($option) ? $self->link(undef, $optman) : ''), | ||||||||||||||||||||||||||||
| 406 | $self->cleanupString($manual, $default->value, tag => 'option_default'), | ||||||||||||||||||||||||||||
| 407 | ]; | ||||||||||||||||||||||||||||
| 408 | } | ||||||||||||||||||||||||||||
| 409 | |||||||||||||||||||||||||||||
| 410 | 0 | my @header = ('Option', 'Defined in', 'Default'); | |||||||||||||||||||||||||||
| 411 | 0 | ▶ | unless(grep length $_->[1], @rows) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 412 | { # removed empty "defined in" column | ||||||||||||||||||||||||||||
| 413 | 0 | splice @$_, 1, 1 for @rows, \@header; | |||||||||||||||||||||||||||
| 414 | } | ||||||||||||||||||||||||||||
| 415 | |||||||||||||||||||||||||||||
| 416 | 0 | $output->print("\n"); | |||||||||||||||||||||||||||
| 417 | 0 | $self->writeTable(output => $output, header => \@header, rows => \@rows, widths => [undef, 15, undef]); | |||||||||||||||||||||||||||
| 418 | 0 | $self; | |||||||||||||||||||||||||||
| 419 | } | ||||||||||||||||||||||||||||
| 420 | |||||||||||||||||||||||||||||
| 421 | |||||||||||||||||||||||||||||
| 422 | sub showOptions(@) | ||||||||||||||||||||||||||||
| 423 | 0 | ▶ | { my ($self, %args) = @_; | ||||||||||||||||||||||||||
|
Subroutine
showOptions: not called CC=7 SCAR=40.3
Pod
documented
| |||||||||||||||||||||||||||||
| 424 | |||||||||||||||||||||||||||||
| 425 | 0 | ▶ | my $options = $args{options} or panic; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 426 | 0 | ▶ | my $manual = $args{manual} or panic; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 427 | |||||||||||||||||||||||||||||
| 428 | 0 | foreach (@$options) | |||||||||||||||||||||||||||
| 429 | 0 | { my ($option, $default) = @$_; | |||||||||||||||||||||||||||
| 430 | 0 | ▶ | my $show = $manual->inherited($option) ? $args{show_inherited_options} : $args{show_described_options}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 431 | |||||||||||||||||||||||||||||
| 432 | 0 | ▶ | my $action | ||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||
| 433 | = $show eq 'USE' ? 'showOptionUse' | ||||||||||||||||||||||||||||
| 434 | : $show eq 'EXPAND'? 'showOptionExpand' | ||||||||||||||||||||||||||||
| 435 | : error __x"illegal show option choice: {value}", value => $show; | ||||||||||||||||||||||||||||
| 436 | |||||||||||||||||||||||||||||
| 437 | 0 | $self->$action(%args, option => $option, default => $default); | |||||||||||||||||||||||||||
| 438 | } | ||||||||||||||||||||||||||||
| 439 | 0 | $self; | |||||||||||||||||||||||||||
| 440 | } | ||||||||||||||||||||||||||||
| 441 | |||||||||||||||||||||||||||||
| 442 | |||||||||||||||||||||||||||||
| 443 | 0 | ▶ | sub showOptionUse(@) { $_[0] } | ||||||||||||||||||||||||||
|
Subroutine
showOptionUse: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 444 | |||||||||||||||||||||||||||||
| 445 | |||||||||||||||||||||||||||||
| 446 | 0 | ▶ | sub showOptionExpand(@) { $_[0] } | ||||||||||||||||||||||||||
|
Subroutine
showOptionExpand: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 447 | |||||||||||||||||||||||||||||
| 448 | 2 | 1; | |||||||||||||||||||||||||||