| 1 | # Copyrights 2003-2021 by [Mark Overmeer]. | ||||||||||||||||||||||||||||||||||||||||
| 2 | # For other contributors see ChangeLog. | ||||||||||||||||||||||||||||||||||||||||
| 3 | # See the manual pages for details on the licensing terms. | ||||||||||||||||||||||||||||||||||||||||
| 4 | # Pod stripped from pm file by OODoc 2.02. | ||||||||||||||||||||||||||||||||||||||||
| 5 | # This code is part of perl distribution OODoc. It is licensed under the | ||||||||||||||||||||||||||||||||||||||||
| 6 | # same terms as Perl itself: https://spdx.org/licenses/Artistic-2.0.html | ||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||
| 8 | package OODoc::Format; | ||||||||||||||||||||||||||||||||||||||||
| 9 | 2 | ▶ | use vars '$VERSION'; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||
| 10 | 2 | $VERSION = '2.02'; | |||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||
| 12 | 2 | ▶ | use base 'OODoc::Object'; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||
| 14 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||
| 15 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||
| 17 | 2 | ▶ | use OODoc::Manifest; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||
| 18 | 2 | ▶ | use Log::Report 'oodoc'; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||
| 21 | sub init($) | ||||||||||||||||||||||||||||||||||||||||
| 22 | 0 | ▶ | { my ($self, $args) = @_; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
init: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||
| 23 | 0 | ▶ | $self->SUPER::init($args) or return; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||||||||
| 25 | my $name = $self->{OF_project} = delete $args->{project} | ||||||||||||||||||||||||||||||||||||||||
| 26 | 0 | ▶ | or error __x"formatter knows no project name"; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||
| 28 | $self->{OF_version} = delete $args->{version} | ||||||||||||||||||||||||||||||||||||||||
| 29 | 0 | ▶ | or error __x"formatter for {name} does not know the version", name => $name; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||
| 31 | $self->{OF_workdir} = delete $args->{workdir} | ||||||||||||||||||||||||||||||||||||||||
| 32 | 0 | ▶ | or error __x"no working directory specified for {name}", name => $name; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||
| 34 | 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
| |||||||||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||||||||
| 36 | 0 | $self; | |||||||||||||||||||||||||||||||||||||||
| 37 | } | ||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||
| 39 | #------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||
| 42 | 0 | ▶ | sub project() {shift->{OF_project}} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
project: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||
| 45 | 0 | ▶ | sub version() {shift->{OF_version}} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
version: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 46 | 0 | ▶ | sub workdir() {shift->{OF_workdir}} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
workdir: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 47 | 0 | ▶ | sub manifest() {shift->{OF_manifest}} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
manifest: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||
| 49 | #------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||
| 52 | 0 | ▶ | sub createManual(@) {panic} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
createManual: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||
| 55 | sub cleanup($$) | ||||||||||||||||||||||||||||||||||||||||
| 56 | 0 | ▶ | { my ($self, $manual, $string) = @_; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
cleanup: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 57 | 0 | $manual->parser->cleanup($self, $manual, $string); | |||||||||||||||||||||||||||||||||||||||
| 58 | } | ||||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||||||||||||||
| 61 | sub showChapter(@) | ||||||||||||||||||||||||||||||||||||||||
| 62 | 0 | ▶ | { my ($self, %args) = @_; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
showChapter: not called CC=16 SCAR=56.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 63 | 0 | ▶ | my $chapter = $args{chapter} or panic; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 64 | 0 | ▶ | my $manual = $args{manual} or panic; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 65 | 0 | ▶ | my $show_ch = $args{show_inherited_chapter} || 'REFER'; | ||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$args{'show_inherited_chapter'} || 'REFER'
MC/DC0%0/1
$args{'show_inherited_chapter'} || 'REFER'
$args{'show_inherited_chapter'}
Truth table0%0/2
A
A= $args{'show_inherited_chapter'}
| |||||||||||||||||||||||||||||||||||||||||
| 66 | 0 | ▶ | my $show_sec = $args{show_inherited_section} || 'REFER'; | ||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$args{'show_inherited_section'} || 'REFER'
MC/DC0%0/1
$args{'show_inherited_section'} || 'REFER'
$args{'show_inherited_section'}
Truth table0%0/2
A
A= $args{'show_inherited_section'}
| |||||||||||||||||||||||||||||||||||||||||
| 67 | 0 | ▶ | my $show_ssec= $args{show_inherited_subsection} || 'REFER'; | ||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$args{'show_inherited_subsection'} || 'REFER'
MC/DC0%0/1
$args{'show_inherited_subsection'} || 'REFER'
$args{'show_inherited_subsection'}
Truth table0%0/2
A
A= $args{'show_inherited_subsection'}
| |||||||||||||||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||||||||||||||
| 69 | 0 | ▶ | if($manual->inherited($chapter)) | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 70 | 0 | ▶ | { return $self if $show_ch eq 'NO'; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 71 | 0 | $self->showStructureRefer(%args, structure => $chapter); | |||||||||||||||||||||||||||||||||||||||
| 72 | 0 | return $self; | |||||||||||||||||||||||||||||||||||||||
| 73 | } | ||||||||||||||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||||||||||||||
| 75 | 0 | $self->showStructureExpand(%args, structure => $chapter); | |||||||||||||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||||||||||||||
| 77 | 0 | foreach my $section ($chapter->sections) | |||||||||||||||||||||||||||||||||||||||
| 78 | 0 | ▶ | { if($manual->inherited($section)) | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 79 | 0 | ▶ | { next if $show_sec eq 'NO'; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 80 | 0 | ▶ | $self->showStructureRefer(%args, structure => $section), next | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 81 | unless $show_sec eq 'REFER'; | ||||||||||||||||||||||||||||||||||||||||
| 82 | } | ||||||||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||||||||
| 84 | 0 | $self->showStructureExpand(%args, structure => $section); | |||||||||||||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||||||||||||||
| 86 | 0 | foreach my $subsection ($section->subsections) | |||||||||||||||||||||||||||||||||||||||
| 87 | 0 | ▶ | { if($manual->inherited($subsection)) | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 88 | 0 | ▶ | { next if $show_ssec eq 'NO'; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 89 | 0 | ▶ | $self->showStructureRefer(%args, structure=>$subsection), next | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 90 | unless $show_ssec eq 'REFER'; | ||||||||||||||||||||||||||||||||||||||||
| 91 | } | ||||||||||||||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||||||||||||||
| 93 | 0 | $self->showStructureExpand(%args, structure => $subsection); | |||||||||||||||||||||||||||||||||||||||
| 94 | } | ||||||||||||||||||||||||||||||||||||||||
| 95 | } | ||||||||||||||||||||||||||||||||||||||||
| 96 | } | ||||||||||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||||||||||
| 98 | #------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||||||||||||||
| 100 | |||||||||||||||||||||||||||||||||||||||||
| 101 | 0 | ▶ | sub showStructureExpanded(@) {panic} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
showStructureExpanded: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 102 | |||||||||||||||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||||||||||||||
| 104 | 0 | ▶ | sub showStructureRefer(@) {panic} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
showStructureRefer: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||||||||||||||
| 106 | #------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||||||||||||||
| 108 | 0 | ▶ | sub chapterName(@) {shift->showRequiredChapter(NAME => @_)} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
chapterName: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||
| 109 | 0 | ▶ | sub chapterSynopsis(@) {shift->showOptionalChapter(SYNOPSIS => @_)} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
chapterSynopsis: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||
| 110 | 0 | ▶ | sub chapterInheritance(@) {shift->showOptionalChapter(INHERITANCE => @_)} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
chapterInheritance: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||
| 111 | 0 | ▶ | sub chapterDescription(@) {shift->showRequiredChapter(DESCRIPTION => @_)} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
chapterDescription: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||
| 112 | 0 | ▶ | sub chapterOverloaded(@) {shift->showOptionalChapter(OVERLOADED => @_)} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
chapterOverloaded: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||
| 113 | 0 | ▶ | sub chapterMethods(@) {shift->showOptionalChapter(METHODS => @_)} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
chapterMethods: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||
| 114 | 0 | ▶ | sub chapterExports(@) {shift->showOptionalChapter(EXPORTS => @_)} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
chapterExports: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||
| 115 | 0 | ▶ | sub chapterDiagnostics(@) {shift->showOptionalChapter(DIAGNOSTICS => @_)} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
chapterDiagnostics: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||
| 116 | 0 | ▶ | sub chapterDetails(@) {shift->showOptionalChapter(DETAILS => @_)} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
chapterDetails: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||
| 117 | 0 | ▶ | sub chapterReferences(@) {shift->showOptionalChapter(REFERENCES => @_)} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
chapterReferences: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||
| 118 | 0 | ▶ | sub chapterCopyrights(@) {shift->showOptionalChapter(COPYRIGHTS => @_)} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
chapterCopyrights: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||||||||||||||
| 120 | #------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||||||||||
| 122 | |||||||||||||||||||||||||||||||||||||||||
| 123 | sub showRequiredChapter($%) | ||||||||||||||||||||||||||||||||||||||||
| 124 | 0 | ▶ | { my ($self, $name, %args) = @_; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
showRequiredChapter: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 125 | 0 | ▶ | my $manual = $args{manual} or panic; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 126 | 0 | my $chapter = $manual->chapter($name); | |||||||||||||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||||||||||||||
| 128 | 0 | ▶ | unless(defined $chapter) | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 129 | 0 | { alert "missing required chapter $name in $manual"; | |||||||||||||||||||||||||||||||||||||||
| 130 | 0 | return; | |||||||||||||||||||||||||||||||||||||||
| 131 | } | ||||||||||||||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||||||||||||||
| 133 | 0 | $self->showChapter(chapter => $chapter, %args); | |||||||||||||||||||||||||||||||||||||||
| 134 | } | ||||||||||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||||||||||||||
| 137 | sub showOptionalChapter($@) | ||||||||||||||||||||||||||||||||||||||||
| 138 | 0 | ▶ | { my ($self, $name, %args) = @_; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
showOptionalChapter: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 139 | 0 | ▶ | my $manual = $args{manual} or panic; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 140 | |||||||||||||||||||||||||||||||||||||||||
| 141 | 0 | my $chapter = $manual->chapter($name); | |||||||||||||||||||||||||||||||||||||||
| 142 | 0 | ▶ | return unless defined $chapter; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||||||||||||||
| 144 | 0 | $self->showChapter(chapter => $chapter, %args); | |||||||||||||||||||||||||||||||||||||||
| 145 | } | ||||||||||||||||||||||||||||||||||||||||
| 146 | |||||||||||||||||||||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||||||||||||||||||
| 148 | 0 | ▶ | sub createOtherPages(@) {shift} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
createOtherPages: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||||||||||||||
| 150 | |||||||||||||||||||||||||||||||||||||||||
| 151 | sub showSubroutines(@) | ||||||||||||||||||||||||||||||||||||||||
| 152 | 0 | ▶ | { my ($self, %args) = @_; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
showSubroutines: not called CC=15 SCAR=54.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||||||||||||||
| 154 | 0 | ▶ | my @subs = $args{subroutines} ? sort @{$args{subroutines}} : []; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 155 | 0 | ▶ | return unless @subs; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 156 | |||||||||||||||||||||||||||||||||||||||||
| 157 | 0 | ▶ | my $manual = $args{manual} or panic; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 158 | 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()
| |||||||||||||||||||||||||||||||||||||||||
| 159 | |||||||||||||||||||||||||||||||||||||||||
| 160 | # list is also in ::Pod3 | ||||||||||||||||||||||||||||||||||||||||
| 161 | 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"}
| |||||||||||||||||||||||||||||||||||||||||
| 162 | 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"}
| |||||||||||||||||||||||||||||||||||||||||
| 163 | 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"}
| |||||||||||||||||||||||||||||||||||||||||
| 164 | 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"}
| |||||||||||||||||||||||||||||||||||||||||
| 165 | 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"}
| |||||||||||||||||||||||||||||||||||||||||
| 166 | 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"}
| |||||||||||||||||||||||||||||||||||||||||
| 167 | 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"}
| |||||||||||||||||||||||||||||||||||||||||
| 168 | 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"}
| |||||||||||||||||||||||||||||||||||||||||
| 169 | |||||||||||||||||||||||||||||||||||||||||
| 170 | 0 | $self->showSubsIndex(%args, subroutines => \@subs); | |||||||||||||||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||||||||||||||
| 172 | 0 | ▶ | for(my $index=0; $index<@subs; $index++) | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 173 | 0 | { my $subroutine = $subs[$index]; | |||||||||||||||||||||||||||||||||||||||
| 174 | my $show = $manual->inherited($subroutine) | ||||||||||||||||||||||||||||||||||||||||
| 175 | ? $args{show_inherited_subs} | ||||||||||||||||||||||||||||||||||||||||
| 176 | 0 | ▶ | : $args{show_described_subs}; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||||||||||
| 178 | 0 | $self->showSubroutine | |||||||||||||||||||||||||||||||||||||||
| 179 | ( %args | ||||||||||||||||||||||||||||||||||||||||
| 180 | , subroutine => $subroutine | ||||||||||||||||||||||||||||||||||||||||
| 181 | , show_subroutine => $show | ||||||||||||||||||||||||||||||||||||||||
| 182 | , last => ($index==$#subs) | ||||||||||||||||||||||||||||||||||||||||
| 183 | ); | ||||||||||||||||||||||||||||||||||||||||
| 184 | } | ||||||||||||||||||||||||||||||||||||||||
| 185 | } | ||||||||||||||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||||||||||||||
| 188 | sub showSubroutine(@) | ||||||||||||||||||||||||||||||||||||||||
| 189 | 0 | ▶ | { my ($self, %args) = @_; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
showSubroutine: not called CC=37 SCAR=72.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 190 | |||||||||||||||||||||||||||||||||||||||||
| 191 | 0 | ▶ | my $subroutine = $args{subroutine} or panic; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 192 | 0 | ▶ | my $manual = $args{manual} or panic; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 193 | 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()
| |||||||||||||||||||||||||||||||||||||||||
| 194 | |||||||||||||||||||||||||||||||||||||||||
| 195 | # | ||||||||||||||||||||||||||||||||||||||||
| 196 | # Method use | ||||||||||||||||||||||||||||||||||||||||
| 197 | # | ||||||||||||||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||||||||||||||
| 199 | 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'}
| |||||||||||||||||||||||||||||||||||||||||
| 200 | 0 | ▶ | my ($show_use, $expand) | ||||||||||||||||||||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||||||||||||||||||||
| 201 | = $use eq 'EXPAND' ? ('showSubroutineUse', 1) | ||||||||||||||||||||||||||||||||||||||||
| 202 | : $use eq 'USE' ? ('showSubroutineUse', 0) | ||||||||||||||||||||||||||||||||||||||||
| 203 | : $use eq 'NAMES' ? ('showSubroutineName', 0) | ||||||||||||||||||||||||||||||||||||||||
| 204 | : $use eq 'NO' ? (undef, 0) | ||||||||||||||||||||||||||||||||||||||||
| 205 | : error __x"illegal value for show_subroutine: {value}", value => $use; | ||||||||||||||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||||||||||||||
| 207 | 0 | ▶ | $self->$show_use(%args, subroutine => $subroutine) | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 208 | if defined $show_use; | ||||||||||||||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||||||||||||||
| 210 | 0 | ▶ | return unless $expand; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||||||||||||||||
| 212 | 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"}
| |||||||||||||||||||||||||||||||||||||||||
| 213 | 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"}
| |||||||||||||||||||||||||||||||||||||||||
| 214 | |||||||||||||||||||||||||||||||||||||||||
| 215 | # | ||||||||||||||||||||||||||||||||||||||||
| 216 | # Subroutine descriptions | ||||||||||||||||||||||||||||||||||||||||
| 217 | # | ||||||||||||||||||||||||||||||||||||||||
| 218 | |||||||||||||||||||||||||||||||||||||||||
| 219 | 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'}
| |||||||||||||||||||||||||||||||||||||||||
| 220 | 0 | my $description = $subroutine->findDescriptionObject; | |||||||||||||||||||||||||||||||||||||||
| 221 | 0 | my $show_descr = 'showSubroutineDescription'; | |||||||||||||||||||||||||||||||||||||||
| 222 | |||||||||||||||||||||||||||||||||||||||||
| 223 | 0 | ▶ | if(not $description || $descr eq 'NO') { $show_descr = undef } | ||||||||||||||||||||||||||||||||||||||
|
Branch: 4 branches
Condition0%0/3
$description || $descr eq 'NO'
MC/DC0%0/2
$description || $descr eq 'NO'
$description
$descr eq 'NO'
Truth table0%0/3
A || B
A= $descriptionB= $descr eq 'NO'
| |||||||||||||||||||||||||||||||||||||||||
| 224 | elsif($descr eq 'REFER') | ||||||||||||||||||||||||||||||||||||||||
| 225 | 0 | ▶ | { $show_descr = 'showSubroutineDescriptionRefer' | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 226 | if $manual->inherited($description); | ||||||||||||||||||||||||||||||||||||||||
| 227 | } | ||||||||||||||||||||||||||||||||||||||||
| 228 | elsif($descr eq 'DESCRIBED') | ||||||||||||||||||||||||||||||||||||||||
| 229 | 0 | ▶ | { $show_descr = undef if $manual->inherited($description) } | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 230 | elsif($descr eq 'ALL') {;} | ||||||||||||||||||||||||||||||||||||||||
| 231 | 0 | else { error __x"illegal value for show_sub_description: {v}", v => $descr} | |||||||||||||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||||||||||||||
| 233 | 0 | ▶ | $self->$show_descr(%args, subroutine => $description) | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 234 | if defined $show_descr; | ||||||||||||||||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||||||||||||||
| 236 | # | ||||||||||||||||||||||||||||||||||||||||
| 237 | # Options | ||||||||||||||||||||||||||||||||||||||||
| 238 | # | ||||||||||||||||||||||||||||||||||||||||
| 239 | |||||||||||||||||||||||||||||||||||||||||
| 240 | 0 | my $options = $subroutine->collectedOptions; | |||||||||||||||||||||||||||||||||||||||
| 241 | |||||||||||||||||||||||||||||||||||||||||
| 242 | 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'}
| |||||||||||||||||||||||||||||||||||||||||
| 243 | 0 | my @options = @{$options}{ sort keys %$options }; | |||||||||||||||||||||||||||||||||||||||
| 244 | |||||||||||||||||||||||||||||||||||||||||
| 245 | # Option table | ||||||||||||||||||||||||||||||||||||||||
| 246 | |||||||||||||||||||||||||||||||||||||||||
| 247 | my @opttab | ||||||||||||||||||||||||||||||||||||||||
| 248 | = $opttab eq 'NO' ? () | ||||||||||||||||||||||||||||||||||||||||
| 249 | 0 | ▶ | : $opttab eq 'DESCRIBED'? (grep {not $manual->inherits($_->[0])} @options) | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 250 | 0 | ▶ | : $opttab eq 'INHERITED'? (grep {$manual->inherits($_->[0])} @options) | ||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||
| 251 | : $opttab eq 'ALL' ? @options | ||||||||||||||||||||||||||||||||||||||||
| 252 | : error __x"illegal value for show_option_table: {v}", v => $opttab; | ||||||||||||||||||||||||||||||||||||||||
| 253 | |||||||||||||||||||||||||||||||||||||||||
| 254 | 0 | ▶ | $self->showOptionTable(%args, options => \@opttab) | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 255 | if @opttab; | ||||||||||||||||||||||||||||||||||||||||
| 256 | |||||||||||||||||||||||||||||||||||||||||
| 257 | # Option expanded | ||||||||||||||||||||||||||||||||||||||||
| 258 | |||||||||||||||||||||||||||||||||||||||||
| 259 | 0 | my @optlist; | |||||||||||||||||||||||||||||||||||||||
| 260 | 0 | foreach (@options) | |||||||||||||||||||||||||||||||||||||||
| 261 | 0 | { my ($option, $default) = @$_; | |||||||||||||||||||||||||||||||||||||||
| 262 | my $check | ||||||||||||||||||||||||||||||||||||||||
| 263 | = $manual->inherited($option) ? $args{show_inherited_options} | ||||||||||||||||||||||||||||||||||||||||
| 264 | 0 | ▶ | : $args{show_described_options}; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 265 | 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"
| |||||||||||||||||||||||||||||||||||||||||
| 266 | } | ||||||||||||||||||||||||||||||||||||||||
| 267 | |||||||||||||||||||||||||||||||||||||||||
| 268 | 0 | ▶ | $self->showOptions(%args, options => \@optlist) | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 269 | if @optlist; | ||||||||||||||||||||||||||||||||||||||||
| 270 | |||||||||||||||||||||||||||||||||||||||||
| 271 | # Examples | ||||||||||||||||||||||||||||||||||||||||
| 272 | |||||||||||||||||||||||||||||||||||||||||
| 273 | 0 | my @examples = $subroutine->examples; | |||||||||||||||||||||||||||||||||||||||
| 274 | 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'}
| |||||||||||||||||||||||||||||||||||||||||
| 275 | 0 | ▶ | $self->showExamples(%args, examples => \@examples) | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 276 | if $show_ex eq 'EXPAND'; | ||||||||||||||||||||||||||||||||||||||||
| 277 | |||||||||||||||||||||||||||||||||||||||||
| 278 | # Diagnostics | ||||||||||||||||||||||||||||||||||||||||
| 279 | |||||||||||||||||||||||||||||||||||||||||
| 280 | 0 | my @diags = $subroutine->diagnostics; | |||||||||||||||||||||||||||||||||||||||
| 281 | 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'}
| |||||||||||||||||||||||||||||||||||||||||
| 282 | 0 | ▶ | $self->showDiagnostics(%args, diagnostics => \@diags) | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 283 | if $show_diag eq 'EXPAND'; | ||||||||||||||||||||||||||||||||||||||||
| 284 | } | ||||||||||||||||||||||||||||||||||||||||
| 285 | |||||||||||||||||||||||||||||||||||||||||
| 286 | |||||||||||||||||||||||||||||||||||||||||
| 287 | 0 | ▶ | sub showExamples(@) {shift} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
showExamples: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 288 | |||||||||||||||||||||||||||||||||||||||||
| 289 | |||||||||||||||||||||||||||||||||||||||||
| 290 | 0 | ▶ | sub showSubroutineUse(@) {shift} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
showSubroutineUse: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 291 | |||||||||||||||||||||||||||||||||||||||||
| 292 | |||||||||||||||||||||||||||||||||||||||||
| 293 | 0 | ▶ | sub showSubroutineName(@) {shift} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
showSubroutineName: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 294 | |||||||||||||||||||||||||||||||||||||||||
| 295 | |||||||||||||||||||||||||||||||||||||||||
| 296 | 0 | ▶ | sub showSubroutineDescription(@) {shift} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
showSubroutineDescription: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 297 | |||||||||||||||||||||||||||||||||||||||||
| 298 | |||||||||||||||||||||||||||||||||||||||||
| 299 | sub showOptionTable(@) | ||||||||||||||||||||||||||||||||||||||||
| 300 | 0 | ▶ | { my ($self, %args) = @_; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
showOptionTable: not called CC=8 SCAR=42.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 301 | 0 | ▶ | my $options = $args{options} or panic; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 302 | 0 | ▶ | my $manual = $args{manual} or panic; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 303 | 0 | ▶ | my $output = $args{output} or panic; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 304 | |||||||||||||||||||||||||||||||||||||||||
| 305 | 0 | my @rows; | |||||||||||||||||||||||||||||||||||||||
| 306 | 0 | foreach (@$options) | |||||||||||||||||||||||||||||||||||||||
| 307 | 0 | { my ($option, $default) = @$_; | |||||||||||||||||||||||||||||||||||||||
| 308 | 0 | my $optman = $option->manual; | |||||||||||||||||||||||||||||||||||||||
| 309 | 0 | ▶ | my $link = $manual->inherited($option) | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 310 | ? $self->link(undef, $optman) | ||||||||||||||||||||||||||||||||||||||||
| 311 | : ''; | ||||||||||||||||||||||||||||||||||||||||
| 312 | 0 | push @rows, [ $self->cleanup($manual, $option->name) | |||||||||||||||||||||||||||||||||||||||
| 313 | , $link | ||||||||||||||||||||||||||||||||||||||||
| 314 | , $self->cleanup($manual, $default->value) | ||||||||||||||||||||||||||||||||||||||||
| 315 | ]; | ||||||||||||||||||||||||||||||||||||||||
| 316 | } | ||||||||||||||||||||||||||||||||||||||||
| 317 | |||||||||||||||||||||||||||||||||||||||||
| 318 | 0 | my @header = ('Option', 'Defined in', 'Default'); | |||||||||||||||||||||||||||||||||||||||
| 319 | 0 | ▶ | unless(grep {length $_->[1]} @rows) | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 320 | { # removed empty "defined in" column | ||||||||||||||||||||||||||||||||||||||||
| 321 | 0 | splice @$_, 1, 1 for @rows, \@header; | |||||||||||||||||||||||||||||||||||||||
| 322 | } | ||||||||||||||||||||||||||||||||||||||||
| 323 | |||||||||||||||||||||||||||||||||||||||||
| 324 | 0 | $output->print("\n"); | |||||||||||||||||||||||||||||||||||||||
| 325 | 0 | $self->writeTable | |||||||||||||||||||||||||||||||||||||||
| 326 | ( output => $output | ||||||||||||||||||||||||||||||||||||||||
| 327 | , header => \@header | ||||||||||||||||||||||||||||||||||||||||
| 328 | , rows => \@rows | ||||||||||||||||||||||||||||||||||||||||
| 329 | , widths => [undef, 15, undef] | ||||||||||||||||||||||||||||||||||||||||
| 330 | ); | ||||||||||||||||||||||||||||||||||||||||
| 331 | |||||||||||||||||||||||||||||||||||||||||
| 332 | 0 | $self | |||||||||||||||||||||||||||||||||||||||
| 333 | } | ||||||||||||||||||||||||||||||||||||||||
| 334 | |||||||||||||||||||||||||||||||||||||||||
| 335 | |||||||||||||||||||||||||||||||||||||||||
| 336 | sub showOptions(@) | ||||||||||||||||||||||||||||||||||||||||
| 337 | 0 | ▶ | { my ($self, %args) = @_; | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
showOptions: not called CC=7 SCAR=40.3
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 338 | |||||||||||||||||||||||||||||||||||||||||
| 339 | 0 | ▶ | my $options = $args{options} or panic; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 340 | 0 | ▶ | my $manual = $args{manual} or panic; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 341 | |||||||||||||||||||||||||||||||||||||||||
| 342 | 0 | foreach (@$options) | |||||||||||||||||||||||||||||||||||||||
| 343 | 0 | { my ($option, $default) = @$_; | |||||||||||||||||||||||||||||||||||||||
| 344 | my $show = $manual->inherited($option) | ||||||||||||||||||||||||||||||||||||||||
| 345 | ? $args{show_inherited_options} | ||||||||||||||||||||||||||||||||||||||||
| 346 | 0 | ▶ | : $args{show_described_options}; | ||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||
| 347 | |||||||||||||||||||||||||||||||||||||||||
| 348 | 0 | ▶ | my $action | ||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||
| 349 | = $show eq 'USE' ? 'showOptionUse' | ||||||||||||||||||||||||||||||||||||||||
| 350 | : $show eq 'EXPAND'? 'showOptionExpand' | ||||||||||||||||||||||||||||||||||||||||
| 351 | : error __x"illegal show option choice: {v}", v => $show; | ||||||||||||||||||||||||||||||||||||||||
| 352 | |||||||||||||||||||||||||||||||||||||||||
| 353 | 0 | $self->$action(%args, option => $option, default => $default); | |||||||||||||||||||||||||||||||||||||||
| 354 | } | ||||||||||||||||||||||||||||||||||||||||
| 355 | 0 | $self; | |||||||||||||||||||||||||||||||||||||||
| 356 | } | ||||||||||||||||||||||||||||||||||||||||
| 357 | |||||||||||||||||||||||||||||||||||||||||
| 358 | |||||||||||||||||||||||||||||||||||||||||
| 359 | 0 | ▶ | sub showOptionUse(@) {shift} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
showOptionUse: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 360 | |||||||||||||||||||||||||||||||||||||||||
| 361 | |||||||||||||||||||||||||||||||||||||||||
| 362 | 0 | ▶ | sub showOptionExpand(@) {shift} | ||||||||||||||||||||||||||||||||||||||
|
Subroutine
showOptionExpand: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||
| 363 | |||||||||||||||||||||||||||||||||||||||||
| 364 | |||||||||||||||||||||||||||||||||||||||||
| 365 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||
| 366 | |||||||||||||||||||||||||||||||||||||||||