lib/OODoc/Format.pm

filter: Statementstmt 11.6% 20 / 172 Branchbran 0.0% 0 / 118 Conditioncond 0.0% 0 / 51 MC/DCmcdc 0.0% 0 / 28 Subroutinesub 15.0% 6 / 40 Podpod 64.7% 22 / 34 totaltotal 10.8% 48 / 443 CC 89 SCAR 61.9
CC
89
Cov
6%
showSubroutine
1406.0
showChapter
306.0
showSubroutines
240.0
CRAP 485.7
« lib/OODoc.pm ↑ Summary lib/OODoc/Format/Html.pm »
1 # Copyrights 2003-2015 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.01.
5  
6 package OODoc::Format;
7 2 ▶use vars '$VERSION';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 $VERSION = '2.01';
9  
10 2 ▶use base 'OODoc::Object';
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 2 ▶use OODoc::Manifest;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 2 ▶use Log::Report 'oodoc';
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18  
19 sub init($)
20 0 ▶{ my ($self, $args) = @_;
Subroutine init: not called CC=6 SCAR=37.4
Pod undocumented
21 0 ▶ $self->SUPER::init($args) or return;
Branch: 1 branch
BranchTrueFalseTotal
$self->SUPER::init($args) or return 0 0 0
22  
23 my $name = $self->{OF_project} = delete $args->{project}
24 0 ▶ or error __x"formatter knows no project name";
Branch: 1 branch
BranchTrueFalseTotal
my $name = $self->{"OF_project"} = delete $args->{"project"} or &error(&__x("formatter knows no project name")) 0 0 0
25  
26 $self->{OF_version} = delete $args->{version}
27 0 ▶ or error __x"formatter for {name} does not know the version", name => $name;
Branch: 1 branch
BranchTrueFalseTotal
$self->{"OF_version"} = delete $args->{"version"} or &error(&__x("formatter for {name} does not know the version", "name", $name)) 0 0 0
28  
29 $self->{OF_workdir} = delete $args->{workdir}
30 0 ▶ or error __x"no working directory specified for {name}", name => $name;
Branch: 1 branch
BranchTrueFalseTotal
$self->{"OF_workdir"} = delete $args->{"workdir"} or &error(&__x("no working directory specified for {name}", "name", $name)) 0 0 0
31  
32 0 ▶ $self->{OF_manifest} = delete $args->{manifest} || OODoc::Manifest->new;
Condition0%0/3
delete $args->{'manifest'} || 'OODoc::Manifest'->new
l!l&&r!l&&!r
000
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
ABresult
1X1
011
000
33  
34 0 $self;
35 }
36  
37 #-------------------------------------------
38  
39  
40 0 ▶sub project() {shift->{OF_project}}
Subroutine project: not called CC=1 SCAR=6.9
Pod documented
41  
42  
43 0 ▶sub version() {shift->{OF_version}}
Subroutine version: not called CC=1 SCAR=6.9
Pod documented
44 0 ▶sub workdir() {shift->{OF_workdir}}
Subroutine workdir: not called CC=1 SCAR=6.9
Pod documented
45 0 ▶sub manifest() {shift->{OF_manifest}}
Subroutine manifest: not called CC=1 SCAR=6.9
Pod documented
46  
47 #-------------------------------------------
48  
49  
50 0 ▶sub createManual(@) {panic}
Subroutine createManual: not called CC=1 SCAR=6.9
Pod documented
51  
52  
53 sub cleanup($$)
54 0 ▶{ my ($self, $manual, $string) = @_;
Subroutine cleanup: not called CC=1 SCAR=6.9
Pod documented
55 0 $manual->parser->cleanup($self, $manual, $string);
56 }
57  
58  
59 sub showChapter(@)
60 0 ▶{ my ($self, %args) = @_;
Subroutine showChapter: not called CC=17 SCAR=57.2
Pod documented
61 0 ▶ my $chapter = $args{chapter} or panic;
Branch: 1 branch
BranchTrueFalseTotal
my $chapter = $args{"chapter"} or &panic() 0 0 0
62 0 ▶ my $manual = $args{manual} or panic;
Branch: 1 branch
BranchTrueFalseTotal
my $manual = $args{"manual"} or &panic() 0 0 0
63 0 ▶ my $show_ch = $args{show_inherited_chapter} || 'REFER';
Condition0%0/2
$args{'show_inherited_chapter'} || 'REFER'
l!l
00
MC/DC0%0/1
$args{'show_inherited_chapter'} || 'REFER'
$args{'show_inherited_chapter'}
Truth table0%0/2
A
A= $args{'show_inherited_chapter'}
Aresult
11
00
64 0 ▶ my $show_sec = $args{show_inherited_section} || 'REFER';
Condition0%0/2
$args{'show_inherited_section'} || 'REFER'
l!l
00
MC/DC0%0/1
$args{'show_inherited_section'} || 'REFER'
$args{'show_inherited_section'}
Truth table0%0/2
A
A= $args{'show_inherited_section'}
Aresult
11
00
65 0 ▶ my $show_ssec= $args{show_inherited_subsection} || 'REFER';
Condition0%0/2
$args{'show_inherited_subsection'} || 'REFER'
l!l
00
MC/DC0%0/1
$args{'show_inherited_subsection'} || 'REFER'
$args{'show_inherited_subsection'}
Truth table0%0/2
A
A= $args{'show_inherited_subsection'}
Aresult
11
00
66 0 ▶warn "show $chapter in $manual ($show_ch, $show_sec, ", ref($self), ")\n"
Branch: 1 branch
BranchTrueFalseTotal
if ref $self =~ /pod/i 0 0 0
67 if ref $self =~ m/pod/i;
68  
69 0 ▶ if($manual->inherited($chapter))
Branch: 1 branch
BranchTrueFalseTotal
if ($manual->inherited($chapter)) 0 0 0
70 0 ▶ { return $self if $show_ch eq 'NO';
Branch: 1 branch
BranchTrueFalseTotal
if $show_ch eq "NO" 0 0 0
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
BranchTrueFalseTotal
if ($manual->inherited($section)) 0 0 0
79 0 ▶ { next if $show_sec eq 'NO';
Branch: 1 branch
BranchTrueFalseTotal
if $show_sec eq "NO" 0 0 0
80 0 ▶ $self->showStructureRefer(%args, structure => $section), next
Branch: 1 branch
BranchTrueFalseTotal
unless $show_sec eq "REFER" 0 0 0
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
BranchTrueFalseTotal
if ($manual->inherited($subsection)) 0 0 0
88 0 ▶ { next if $show_ssec eq 'NO';
Branch: 1 branch
BranchTrueFalseTotal
if $show_ssec eq "NO" 0 0 0
89 0 ▶ $self->showStructureRefer(%args, structure=>$subsection), next
Branch: 1 branch
BranchTrueFalseTotal
unless $show_ssec eq "REFER" 0 0 0
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
BranchTrueFalseTotal
my $manual = $args{"manual"} or &panic() 0 0 0
126 0 my $chapter = $manual->chapter($name);
127  
128 0 ▶ unless(defined $chapter)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $chapter) 0 0 0
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
BranchTrueFalseTotal
my $manual = $args{"manual"} or &panic() 0 0 0
140  
141 0 my $chapter = $manual->chapter($name);
142 0 ▶ return unless defined $chapter;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $chapter 0 0 0
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
BranchTrueFalseTotal
$args{'subroutines'} ? : 0 0 0
155 0 ▶ return unless @subs;
Branch: 1 branch
BranchTrueFalseTotal
unless @subs 0 0 0
156  
157 0 ▶ my $manual = $args{manual} or panic;
Branch: 1 branch
BranchTrueFalseTotal
my $manual = $args{"manual"} or &panic() 0 0 0
158 0 ▶ my $output = $args{output} || select;
Condition0%0/3
$args{'output'} || select()
l!l&&r!l&&!r
000
MC/DC0%0/2
$args{'output'} || select()
$args{'output'} select()
Truth table0%0/3
A || B
A= $args{'output'}B= select()
ABresult
1X1
011
000
159  
160 # list is also in ::Pod3
161 0 ▶ $args{show_described_options} ||= 'EXPAND';
Condition0%0/2
$args{"show_described_options"} ||= "EXPAND"
l!l
00
MC/DC0%0/1
$args{"show_described_options"} ||= "EXPAND"
$args{"show_described_options"}
Truth table0%0/2
A
A= $args{"show_described_options"}
Aresult
11
00
162 0 ▶ $args{show_described_subs} ||= 'EXPAND';
Condition0%0/2
$args{"show_described_subs"} ||= "EXPAND"
l!l
00
MC/DC0%0/1
$args{"show_described_subs"} ||= "EXPAND"
$args{"show_described_subs"}
Truth table0%0/2
A
A= $args{"show_described_subs"}
Aresult
11
00
163 0 ▶ $args{show_diagnostics} ||= 'NO';
Condition0%0/2
$args{"show_diagnostics"} ||= "NO"
l!l
00
MC/DC0%0/1
$args{"show_diagnostics"} ||= "NO"
$args{"show_diagnostics"}
Truth table0%0/2
A
A= $args{"show_diagnostics"}
Aresult
11
00
164 0 ▶ $args{show_examples} ||= 'EXPAND';
Condition0%0/2
$args{"show_examples"} ||= "EXPAND"
l!l
00
MC/DC0%0/1
$args{"show_examples"} ||= "EXPAND"
$args{"show_examples"}
Truth table0%0/2
A
A= $args{"show_examples"}
Aresult
11
00
165 0 ▶ $args{show_inherited_options} ||= 'USE';
Condition0%0/2
$args{"show_inherited_options"} ||= "USE"
l!l
00
MC/DC0%0/1
$args{"show_inherited_options"} ||= "USE"
$args{"show_inherited_options"}
Truth table0%0/2
A
A= $args{"show_inherited_options"}
Aresult
11
00
166 0 ▶ $args{show_inherited_subs} ||= 'USE';
Condition0%0/2
$args{"show_inherited_subs"} ||= "USE"
l!l
00
MC/DC0%0/1
$args{"show_inherited_subs"} ||= "USE"
$args{"show_inherited_subs"}
Truth table0%0/2
A
A= $args{"show_inherited_subs"}
Aresult
11
00
167 0 ▶ $args{show_option_table} ||= 'ALL';
Condition0%0/2
$args{"show_option_table"} ||= "ALL"
l!l
00
MC/DC0%0/1
$args{"show_option_table"} ||= "ALL"
$args{"show_option_table"}
Truth table0%0/2
A
A= $args{"show_option_table"}
Aresult
11
00
168 0 ▶ $args{show_subs_index} ||= 'NO';
Condition0%0/2
$args{"show_subs_index"} ||= "NO"
l!l
00
MC/DC0%0/1
$args{"show_subs_index"} ||= "NO"
$args{"show_subs_index"}
Truth table0%0/2
A
A= $args{"show_subs_index"}
Aresult
11
00
169  
170 0 $self->showSubsIndex(%args, subroutines => \@subs);
171  
172 0 ▶ for(my $index=0; $index<@subs; $index++)
Branch: 1 branch
BranchTrueFalseTotal
if ($index < @subs) 0 0 0
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
BranchTrueFalseTotal
$manual->inherited($subroutine) ? : 0 0 0
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
BranchTrueFalseTotal
my $subroutine = $args{"subroutine"} or &panic() 0 0 0
192 0 ▶ my $manual = $args{manual} or panic;
Branch: 1 branch
BranchTrueFalseTotal
my $manual = $args{"manual"} or &panic() 0 0 0
193 0 ▶ my $output = $args{output} || select;
Condition0%0/3
$args{'output'} || select()
l!l&&r!l&&!r
000
MC/DC0%0/2
$args{'output'} || select()
$args{'output'} select()
Truth table0%0/3
A || B
A= $args{'output'}B= select()
ABresult
1X1
011
000
194  
195 #
196 # Method use
197 #
198  
199 0 ▶ my $use = $args{show_subroutine} || 'EXPAND';
Condition0%0/2
$args{'show_subroutine'} || 'EXPAND'
l!l
00
MC/DC0%0/1
$args{'show_subroutine'} || 'EXPAND'
$args{'show_subroutine'}
Truth table0%0/2
A
A= $args{'show_subroutine'}
Aresult
11
00
200 0 ▶ my ($show_use, $expand)
Branch: 4 branches
BranchTrueFalseTotal
$use eq 'EXPAND' ? : 0 0 0
$use eq 'USE' ? : 0 0 0
$use eq 'NAMES' ? : 0 0 0
$use eq 'NO' ? : 0 0 0
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
BranchTrueFalseTotal
if defined $show_use 0 0 0
208 if defined $show_use;
209
210 0 ▶ return unless $expand;
Branch: 1 branch
BranchTrueFalseTotal
unless $expand 0 0 0
211  
212 0 ▶ $args{show_inherited_options} ||= 'USE';
Condition0%0/2
$args{"show_inherited_options"} ||= "USE"
l!l
00
MC/DC0%0/1
$args{"show_inherited_options"} ||= "USE"
$args{"show_inherited_options"}
Truth table0%0/2
A
A= $args{"show_inherited_options"}
Aresult
11
00
213 0 ▶ $args{show_described_options} ||= 'EXPAND';
Condition0%0/2
$args{"show_described_options"} ||= "EXPAND"
l!l
00
MC/DC0%0/1
$args{"show_described_options"} ||= "EXPAND"
$args{"show_described_options"}
Truth table0%0/2
A
A= $args{"show_described_options"}
Aresult
11
00
214  
215 #
216 # Subroutine descriptions
217 #
218  
219 0 ▶ my $descr = $args{show_sub_description} || 'DESCRIBED';
Condition0%0/2
$args{'show_sub_description'} || 'DESCRIBED'
l!l
00
MC/DC0%0/1
$args{'show_sub_description'} || 'DESCRIBED'
$args{'show_sub_description'}
Truth table0%0/2
A
A= $args{'show_sub_description'}
Aresult
11
00
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
BranchTrueFalseTotal
if (not $description || $descr eq 'NO') { } 0 0 0
elsif ($descr eq 'REFER') { } 0 0 0
elsif ($descr eq 'DESCRIBED') { } 0 0 0
elsif ($descr eq 'ALL') { } 0 0 0
Condition0%0/3
$description || $descr eq 'NO'
l!l&&r!l&&!r
000
MC/DC0%0/2
$description || $descr eq 'NO'
$description $descr eq 'NO'
Truth table0%0/3
A || B
A= $descriptionB= $descr eq 'NO'
ABresult
1X1
011
000
224 elsif($descr eq 'REFER')
225 0 ▶ { $show_descr = 'showSubroutineDescriptionRefer'
Branch: 1 branch
BranchTrueFalseTotal
if $manual->inherited($description) 0 0 0
226 if $manual->inherited($description);
227 }
228 elsif($descr eq 'DESCRIBED')
229 0 ▶ { $show_descr = undef if $manual->inherited($description) }
Branch: 1 branch
BranchTrueFalseTotal
if $manual->inherited($description) 0 0 0
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
BranchTrueFalseTotal
if defined $show_descr 0 0 0
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'
l!l
00
MC/DC0%0/1
$args{'show_option_table'} || 'NAMES'
$args{'show_option_table'}
Truth table0%0/2
A
A= $args{'show_option_table'}
Aresult
11
00
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
BranchTrueFalseTotal
$opttab eq 'INHERITED' ? : 0 0 0
250 0 ▶ : $opttab eq 'INHERITED'? (grep {$manual->inherits($_->[0])} @options)
Branch: 3 branches
BranchTrueFalseTotal
$opttab eq 'NO' ? : 0 0 0
$opttab eq 'DESCRIBED' ? : 0 0 0
$opttab eq 'ALL' ? : 0 0 0
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
BranchTrueFalseTotal
if @opttab 0 0 0
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
BranchTrueFalseTotal
$manual->inherited($option) ? : 0 0 0
265 0 ▶ push @optlist, $_ if $check eq 'USE' || $check eq 'EXPAND';
Branch: 1 branch
BranchTrueFalseTotal
if $check eq "USE" or $check eq "EXPAND" 0 0 0
Condition0%0/3
$check eq "USE" or $check eq "EXPAND"
l!l&&r!l&&!r
000
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"
ABresult
1X1
011
000
266 }
267  
268 0 ▶ $self->showOptions(%args, options => \@optlist)
Branch: 1 branch
BranchTrueFalseTotal
if @optlist 0 0 0
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'
l!l
00
MC/DC0%0/1
$args{'show_examples'} || 'EXPAND'
$args{'show_examples'}
Truth table0%0/2
A
A= $args{'show_examples'}
Aresult
11
00
275 0 ▶ $self->showExamples(%args, examples => \@examples)
Branch: 1 branch
BranchTrueFalseTotal
if $show_ex eq "EXPAND" 0 0 0
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'
l!l
00
MC/DC0%0/1
$args{'show_diagnostics'} || 'NO'
$args{'show_diagnostics'}
Truth table0%0/2
A
A= $args{'show_diagnostics'}
Aresult
11
00
282 0 ▶ $self->showDiagnostics(%args, diagnostics => \@diags)
Branch: 1 branch
BranchTrueFalseTotal
if $show_diag eq "EXPAND" 0 0 0
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
BranchTrueFalseTotal
my $options = $args{"options"} or &panic() 0 0 0
302 0 ▶ my $manual = $args{manual} or panic;
Branch: 1 branch
BranchTrueFalseTotal
my $manual = $args{"manual"} or &panic() 0 0 0
303 0 ▶ my $output = $args{output} or panic;
Branch: 1 branch
BranchTrueFalseTotal
my $output = $args{"output"} or &panic() 0 0 0
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
BranchTrueFalseTotal
$manual->inherited($option) ? : 0 0 0
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
BranchTrueFalseTotal
unless (grep {length $_->[1];} @rows) 0 0 0
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
BranchTrueFalseTotal
my $options = $args{"options"} or &panic() 0 0 0
340 0 ▶ my $manual = $args{manual} or panic;
Branch: 1 branch
BranchTrueFalseTotal
my $manual = $args{"manual"} or &panic() 0 0 0
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
BranchTrueFalseTotal
$manual->inherited($option) ? : 0 0 0
347  
348 0 ▶ my $action
Branch: 2 branches
BranchTrueFalseTotal
$show eq 'USE' ? : 0 0 0
$show eq 'EXPAND' ? : 0 0 0
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  
« lib/OODoc.pm ↑ Summary lib/OODoc/Format/Html.pm »