line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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::Text::SubSection; |
9
|
1
|
|
|
1
|
|
703
|
use vars '$VERSION'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
61
|
|
10
|
|
|
|
|
|
|
$VERSION = '2.02'; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
1
|
|
6
|
use base 'OODoc::Text::Structure'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
384
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
15
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
5
|
use Log::Report 'oodoc'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub init($) |
21
|
0
|
|
|
0
|
0
|
|
{ my ($self, $args) = @_; |
22
|
0
|
|
0
|
|
|
|
$args->{type} ||= 'Subsection'; |
23
|
0
|
0
|
0
|
|
|
|
$args->{container} ||= delete $args->{section} or panic; |
24
|
0
|
|
0
|
|
|
|
$args->{level} ||= 3; |
25
|
|
|
|
|
|
|
|
26
|
0
|
0
|
|
|
|
|
$self->SUPER::init($args) or return; |
27
|
0
|
|
|
|
|
|
$self->{OTS_subsubsections} = []; |
28
|
0
|
|
|
|
|
|
$self; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub emptyExtension($) |
32
|
0
|
|
|
0
|
1
|
|
{ my ($self, $container) = @_; |
33
|
0
|
|
|
|
|
|
my $empty = $self->SUPER::emptyExtension($container); |
34
|
0
|
|
|
|
|
|
my @subsub = map $_->emptyExtension($empty), $self->subsubsections; |
35
|
0
|
|
|
|
|
|
$empty->subsubsections(@subsub); |
36
|
0
|
|
|
|
|
|
$empty; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub findEntry($) |
40
|
0
|
|
|
0
|
1
|
|
{ my ($self, $name) = @_; |
41
|
0
|
0
|
|
|
|
|
$self->name eq $name ? $self : (); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
#------------------------------------------- |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
0
|
|
|
0
|
1
|
|
sub section() { shift->container } |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
0
|
1
|
|
sub chapter() { shift->section->chapter } |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub path() |
53
|
0
|
|
|
0
|
1
|
|
{ my $self = shift; |
54
|
0
|
|
|
|
|
|
$self->section->path . '/' . $self->name; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
#------------------------------------------- |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub subsubsection($) |
61
|
0
|
|
|
0
|
1
|
|
{ my ($self, $thing) = @_; |
62
|
|
|
|
|
|
|
|
63
|
0
|
0
|
|
|
|
|
if(ref $thing) |
64
|
0
|
|
|
|
|
|
{ push @{$self->{OTS_subsubsections}}, $thing; |
|
0
|
|
|
|
|
|
|
65
|
0
|
|
|
|
|
|
return $thing; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
|
first {$_->name eq $thing} $self->subsubsections; |
|
0
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub subsubsections(;@) |
73
|
0
|
|
|
0
|
1
|
|
{ my $self = shift; |
74
|
0
|
0
|
|
|
|
|
if(@_) |
75
|
0
|
|
|
|
|
|
{ $self->{OTS_subsubsections} = [ @_ ]; |
76
|
0
|
|
|
|
|
|
$_->container($self) for @_; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
0
|
|
|
|
|
|
@{$self->{OTS_subsubsections}}; |
|
0
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
1; |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
1; |