line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Elements; |
2
|
|
|
|
|
|
|
# ABSTRACT: the base classes for PseudoPod DOM objects |
3
|
|
|
|
|
|
|
|
4
|
26
|
|
|
26
|
|
195
|
use strict; |
|
26
|
|
|
|
|
62
|
|
|
26
|
|
|
|
|
792
|
|
5
|
26
|
|
|
26
|
|
165
|
use warnings; |
|
26
|
|
|
|
|
65
|
|
|
26
|
|
|
|
|
670
|
|
6
|
|
|
|
|
|
|
|
7
|
26
|
|
|
26
|
|
15382
|
use Moose; |
|
26
|
|
|
|
|
12089944
|
|
|
26
|
|
|
|
|
187
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
{ |
10
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element; |
11
|
|
|
|
|
|
|
|
12
|
26
|
|
|
26
|
|
198843
|
use Moose; |
|
26
|
|
|
|
|
74
|
|
|
26
|
|
|
|
|
123
|
|
13
|
|
|
|
|
|
|
with 'MooseX::Traits'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has 'type', is => 'ro', required => 1; |
16
|
0
|
|
|
0
|
0
|
0
|
sub is_empty { 1 } |
17
|
611
|
|
|
611
|
0
|
1175
|
sub is_visible { 1 } |
18
|
1118
|
|
|
1118
|
0
|
2603
|
sub can_contain_anchor { 0 } |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
{ |
22
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::ParentElement; |
23
|
|
|
|
|
|
|
|
24
|
26
|
|
|
26
|
|
174529
|
use Moose; |
|
26
|
|
|
|
|
74
|
|
|
26
|
|
|
|
|
154
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::Element'; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
has 'children', |
29
|
|
|
|
|
|
|
is => 'rw', |
30
|
|
|
|
|
|
|
isa => 'ArrayRef[Pod::PseudoPod::DOM::Element]', |
31
|
|
|
|
|
|
|
default => sub { [] }; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub add |
34
|
|
|
|
|
|
|
{ |
35
|
4851
|
|
|
4851
|
0
|
11554
|
my $self = shift; |
36
|
4851
|
|
|
|
|
8932
|
push @{ $self->children }, grep { defined } @_; |
|
4851
|
|
|
|
|
166931
|
|
|
4851
|
|
|
|
|
29083
|
|
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
4136
|
|
|
4136
|
0
|
9222
|
sub add_children { push @{ shift->children }, @_ } |
|
4136
|
|
|
|
|
143856
|
|
40
|
|
|
|
|
|
|
|
41
|
219
|
|
|
219
|
0
|
425
|
sub is_empty { return @{ shift->children } == 0 } |
|
219
|
|
|
|
|
7803
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub remove |
44
|
|
|
|
|
|
|
{ |
45
|
0
|
|
|
0
|
0
|
0
|
my ($self, $kid) = @_; |
46
|
0
|
|
|
|
|
0
|
my $kids = $self->children; |
47
|
0
|
|
|
|
|
0
|
@{ $self->children } = [ grep { $_ != $kid } @$kids ]; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
{ |
52
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::Paragraph; |
53
|
|
|
|
|
|
|
|
54
|
26
|
|
|
26
|
|
176910
|
use Moose; |
|
26
|
|
|
|
|
74
|
|
|
26
|
|
|
|
|
172
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::ParentElement'; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub has_visible_kids |
59
|
|
|
|
|
|
|
{ |
60
|
589
|
|
|
589
|
0
|
1003
|
my $self = shift; |
61
|
589
|
|
|
|
|
844
|
return grep { $_->is_visible } @{ $self->children }; |
|
2340
|
|
|
|
|
7068
|
|
|
589
|
|
|
|
|
18090
|
|
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
{ |
66
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::Text::Plain; |
67
|
|
|
|
|
|
|
|
68
|
26
|
|
|
26
|
|
173254
|
use Moose; |
|
26
|
|
|
|
|
80
|
|
|
26
|
|
|
|
|
142
|
|
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::ParentElement'; |
71
|
|
|
|
|
|
|
has 'content', is => 'rw'; |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub add |
74
|
|
|
|
|
|
|
{ |
75
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
76
|
0
|
|
|
|
|
0
|
$self->content( shift ); |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
1375
|
|
|
1375
|
0
|
43506
|
sub is_visible { shift->content =~ /\S/ } |
80
|
0
|
|
|
0
|
0
|
0
|
sub is_empty { length( shift->content ) == 0 } |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
{ |
84
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::Linkable; |
85
|
|
|
|
|
|
|
|
86
|
26
|
|
|
26
|
|
175117
|
use Moose; |
|
26
|
|
|
|
|
67
|
|
|
26
|
|
|
|
|
157
|
|
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::ParentElement'; |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
has 'link', is => 'rw', default => ''; |
91
|
|
|
|
|
|
|
has 'heading', is => 'rw', required => 1; |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
{ |
95
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::Text::Anchor; |
96
|
|
|
|
|
|
|
|
97
|
26
|
|
|
26
|
|
172947
|
use Moose; |
|
26
|
|
|
|
|
81
|
|
|
26
|
|
|
|
|
130
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::Element::Linkable'; |
100
|
|
|
|
|
|
|
|
101
|
1
|
|
|
1
|
0
|
4
|
sub is_visible { 0 } |
102
|
0
|
|
|
0
|
0
|
0
|
sub get_anchor { shift->emit_kids( encode => 'index_anchor' ) } |
103
|
53
|
|
|
53
|
0
|
1942
|
sub get_link_text { shift->heading->emit_kids } |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
{ |
107
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::Text::HeadingAnchor; |
108
|
|
|
|
|
|
|
|
109
|
26
|
|
|
26
|
|
173394
|
use Moose; |
|
26
|
|
|
|
|
90
|
|
|
26
|
|
|
|
|
251
|
|
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::Element::Text::Anchor'; |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
{ |
115
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::Text::Index; |
116
|
|
|
|
|
|
|
|
117
|
26
|
|
|
26
|
|
172219
|
use Moose; |
|
26
|
|
|
|
|
78
|
|
|
26
|
|
|
|
|
128
|
|
118
|
|
|
|
|
|
|
has 'id', is => 'rw', default => 1; |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::Element::Linkable'; |
121
|
|
|
|
|
|
|
|
122
|
353
|
|
|
353
|
0
|
756
|
sub is_visible { 0 } |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
sub get_key |
125
|
|
|
|
|
|
|
{ |
126
|
17
|
|
|
17
|
0
|
39
|
my $self = shift; |
127
|
17
|
|
|
|
|
54
|
split /\s*;\s*/, join ' ', $self->emit_kids( encode => 'index_key' ); |
128
|
|
|
|
|
|
|
} |
129
|
|
|
|
|
|
|
} |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
{ |
132
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::Text::Link; |
133
|
|
|
|
|
|
|
|
134
|
26
|
|
|
26
|
|
172292
|
use Moose; |
|
26
|
|
|
|
|
74
|
|
|
26
|
|
|
|
|
156
|
|
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::Element::Linkable'; |
137
|
|
|
|
|
|
|
} |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
{ |
140
|
|
|
|
|
|
|
my $parent = 'Pod::PseudoPod::DOM::Element::Text'; |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
for my $text_item (qw( |
143
|
|
|
|
|
|
|
Bold Character Code Entity File Footnote Italics |
144
|
|
|
|
|
|
|
Subscript Superscript URL )) |
145
|
|
|
|
|
|
|
{ |
146
|
|
|
|
|
|
|
Class::MOP::Class->create( |
147
|
|
|
|
|
|
|
"${parent}::${text_item}" => |
148
|
|
|
|
|
|
|
superclasses => ['Pod::PseudoPod::DOM::ParentElement'] |
149
|
|
|
|
|
|
|
); |
150
|
|
|
|
|
|
|
} |
151
|
|
|
|
|
|
|
} |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
{ |
154
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::Heading; |
155
|
|
|
|
|
|
|
|
156
|
26
|
|
|
26
|
|
174852
|
use Moose; |
|
26
|
|
|
|
|
76
|
|
|
26
|
|
|
|
|
149
|
|
157
|
26
|
|
|
26
|
|
170024
|
use Scalar::Util (); |
|
26
|
|
|
|
|
71
|
|
|
26
|
|
|
|
|
4836
|
|
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::ParentElement'; |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
has 'level', is => 'ro', required => 1; |
162
|
|
|
|
|
|
|
has 'anchor', is => 'rw'; |
163
|
|
|
|
|
|
|
has 'filename', is => 'ro', required => 1; |
164
|
|
|
|
|
|
|
|
165
|
225
|
|
|
225
|
0
|
612
|
sub can_contain_anchor { 1 } |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
sub exclude_from_toc |
168
|
|
|
|
|
|
|
{ |
169
|
8
|
|
|
8
|
0
|
24
|
my ($self, $max_depth) = @_; |
170
|
|
|
|
|
|
|
|
171
|
8
|
50
|
|
|
|
40
|
return scalar $self->emit_kids =~ /^\*/ unless defined $max_depth; |
172
|
0
|
|
|
|
|
0
|
return $self->level > $max_depth; |
173
|
|
|
|
|
|
|
} |
174
|
|
|
|
|
|
|
} |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
{ |
177
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::List; |
178
|
|
|
|
|
|
|
|
179
|
26
|
|
|
26
|
|
222
|
use Moose; |
|
26
|
|
|
|
|
86
|
|
|
26
|
|
|
|
|
608
|
|
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::ParentElement'; |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
sub fixup_list |
184
|
|
|
|
|
|
|
{ |
185
|
197
|
|
|
197
|
0
|
519
|
my $self = shift; |
186
|
197
|
|
|
|
|
6727
|
my $kids = $self->children; |
187
|
197
|
|
|
|
|
584
|
my @newkids; |
188
|
|
|
|
|
|
|
my $prev; |
189
|
|
|
|
|
|
|
|
190
|
197
|
|
|
|
|
999
|
for my $i (0 .. $#$kids) |
191
|
|
|
|
|
|
|
{ |
192
|
781
|
|
|
|
|
1426
|
my $kid = $kids->[$i]; |
193
|
781
|
100
|
|
|
|
2667
|
if ($kid->isa( 'Pod::PseudoPod::DOM::Element::ListItem' )) |
194
|
|
|
|
|
|
|
{ |
195
|
562
|
100
|
|
|
|
1523
|
push @newkids, $prev if $prev; |
196
|
562
|
|
|
|
|
982
|
$prev = $kid; |
197
|
562
|
|
|
|
|
1152
|
next; |
198
|
|
|
|
|
|
|
} |
199
|
219
|
50
|
|
|
|
831
|
next if $kid->is_empty; |
200
|
|
|
|
|
|
|
|
201
|
219
|
|
|
|
|
650
|
$prev->add( $kid ); |
202
|
|
|
|
|
|
|
} |
203
|
197
|
50
|
|
|
|
751
|
push @newkids, $prev if $prev; |
204
|
|
|
|
|
|
|
|
205
|
197
|
|
|
|
|
6606
|
$self->children( \@newkids ); |
206
|
|
|
|
|
|
|
} |
207
|
|
|
|
|
|
|
} |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
{ |
210
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::ListItem; |
211
|
|
|
|
|
|
|
|
212
|
26
|
|
|
26
|
|
175680
|
use Moose; |
|
26
|
|
|
|
|
78
|
|
|
26
|
|
|
|
|
156
|
|
213
|
|
|
|
|
|
|
has 'marker', is => 'ro'; |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::ParentElement'; |
216
|
|
|
|
|
|
|
} |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
{ |
219
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::Sidebar; |
220
|
|
|
|
|
|
|
|
221
|
26
|
|
|
26
|
|
173545
|
use Moose; |
|
26
|
|
|
|
|
402
|
|
|
26
|
|
|
|
|
158
|
|
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::ParentElement'; |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
has 'title', is => 'rw', default => ''; |
226
|
|
|
|
|
|
|
} |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
{ |
229
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::Figure; |
230
|
|
|
|
|
|
|
|
231
|
26
|
|
|
26
|
|
172914
|
use Moose; |
|
26
|
|
|
|
|
63
|
|
|
26
|
|
|
|
|
155
|
|
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::ParentElement'; |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
has 'caption', is => 'rw', default => ''; |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
sub anchor { |
238
|
24
|
|
|
24
|
0
|
71
|
my $self = shift; |
239
|
24
|
|
|
|
|
59
|
for my $kid (@{ $self->children }) |
|
24
|
|
|
|
|
854
|
|
240
|
|
|
|
|
|
|
{ |
241
|
24
|
50
|
|
|
|
767
|
next unless $kid->type eq 'anchor'; |
242
|
24
|
|
|
|
|
110
|
return $kid; |
243
|
|
|
|
|
|
|
} |
244
|
|
|
|
|
|
|
} |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
sub fixup_figure |
247
|
|
|
|
|
|
|
{ |
248
|
24
|
|
|
24
|
0
|
77
|
my $self = shift; |
249
|
24
|
|
|
|
|
965
|
my $children = $self->children; |
250
|
|
|
|
|
|
|
@$children = map |
251
|
|
|
|
|
|
|
{ |
252
|
24
|
|
|
|
|
134
|
$_->type eq 'paragraph' |
253
|
48
|
50
|
|
|
|
1566
|
? @{ $_->children } |
|
48
|
|
|
|
|
1636
|
|
254
|
|
|
|
|
|
|
: $_ |
255
|
|
|
|
|
|
|
} @$children; |
256
|
|
|
|
|
|
|
} |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
sub file |
259
|
|
|
|
|
|
|
{ |
260
|
24
|
|
|
24
|
0
|
74
|
my $self = shift; |
261
|
24
|
|
|
|
|
59
|
for my $kid (@{ $self->children }) |
|
24
|
|
|
|
|
827
|
|
262
|
|
|
|
|
|
|
{ |
263
|
48
|
100
|
|
|
|
1471
|
next unless $kid->type eq 'file'; |
264
|
24
|
|
|
|
|
154
|
return $kid; |
265
|
|
|
|
|
|
|
} |
266
|
|
|
|
|
|
|
} |
267
|
|
|
|
|
|
|
} |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
{ |
270
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::Block; |
271
|
|
|
|
|
|
|
|
272
|
26
|
|
|
26
|
|
179964
|
use Moose; |
|
26
|
|
|
|
|
78
|
|
|
26
|
|
|
|
|
150
|
|
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
has 'title', is => 'rw', default => ''; |
275
|
|
|
|
|
|
|
has 'target', is => 'ro', default => ''; |
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::ParentElement'; |
278
|
|
|
|
|
|
|
} |
279
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
{ |
281
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::Table; |
282
|
|
|
|
|
|
|
|
283
|
26
|
|
|
26
|
|
173979
|
use Moose; |
|
26
|
|
|
|
|
69
|
|
|
26
|
|
|
|
|
138
|
|
284
|
26
|
|
|
26
|
|
187436
|
use List::Util 'first'; |
|
26
|
|
|
|
|
1759
|
|
|
26
|
|
|
|
|
20412
|
|
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
has 'title', is => 'rw', default => ''; |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::ParentElement'; |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
# make sure all kids are rows |
291
|
|
|
|
|
|
|
sub fixup |
292
|
|
|
|
|
|
|
{ |
293
|
24
|
|
|
24
|
0
|
79
|
my $self = shift; |
294
|
24
|
|
|
|
|
867
|
my $children = $self->children; |
295
|
24
|
|
|
|
|
87
|
my $kidclass = 'Pod::PseudoPod::DOM::Element::TableRow'; |
296
|
24
|
|
|
24
|
|
257
|
my $prev = first { $_->isa( $kidclass ) } @$children; |
|
24
|
|
|
|
|
527
|
|
297
|
|
|
|
|
|
|
|
298
|
24
|
|
|
|
|
151
|
for my $kid (@$children) |
299
|
|
|
|
|
|
|
{ |
300
|
144
|
100
|
|
|
|
604
|
if ($kid->isa( $kidclass )) |
301
|
|
|
|
|
|
|
{ |
302
|
72
|
|
|
|
|
159
|
$prev = $kid; |
303
|
|
|
|
|
|
|
} |
304
|
|
|
|
|
|
|
else |
305
|
|
|
|
|
|
|
{ |
306
|
72
|
|
|
|
|
217
|
$prev->add( $kid ); |
307
|
|
|
|
|
|
|
} |
308
|
|
|
|
|
|
|
} |
309
|
|
|
|
|
|
|
|
310
|
24
|
|
|
|
|
89
|
@$children = grep { $_->isa( $kidclass ) } @$children; |
|
144
|
|
|
|
|
423
|
|
311
|
|
|
|
|
|
|
|
312
|
24
|
|
|
|
|
332
|
$_->fixup for @$children; |
313
|
|
|
|
|
|
|
} |
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
sub num_cols |
316
|
|
|
|
|
|
|
{ |
317
|
11
|
|
|
11
|
0
|
35
|
my $self = shift; |
318
|
11
|
|
|
|
|
172
|
return $self->headrow->num_cells; |
319
|
|
|
|
|
|
|
} |
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
sub headrow |
322
|
|
|
|
|
|
|
{ |
323
|
11
|
|
|
11
|
0
|
34
|
my $self = shift; |
324
|
11
|
|
|
|
|
437
|
my $rows = $self->children; |
325
|
|
|
|
|
|
|
|
326
|
11
|
50
|
|
|
|
57
|
return unless @$rows; |
327
|
11
|
|
|
|
|
145
|
return $rows->[0]; |
328
|
|
|
|
|
|
|
} |
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
sub bodyrows |
331
|
|
|
|
|
|
|
{ |
332
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
333
|
0
|
|
|
|
|
0
|
my $rows = $self->children; |
334
|
|
|
|
|
|
|
|
335
|
0
|
0
|
0
|
|
|
0
|
return unless @$rows and @$rows > 1; |
336
|
0
|
|
|
|
|
0
|
return @{ $rows }[1 .. $#$rows ]; |
|
0
|
|
|
|
|
0
|
|
337
|
|
|
|
|
|
|
} |
338
|
|
|
|
|
|
|
} |
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
{ |
341
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::TableRow; |
342
|
|
|
|
|
|
|
|
343
|
26
|
|
|
26
|
|
1842
|
use Moose; |
|
26
|
|
|
|
|
1540
|
|
|
26
|
|
|
|
|
3039
|
|
344
|
26
|
|
|
26
|
|
179545
|
use List::Util 'first'; |
|
26
|
|
|
|
|
66
|
|
|
26
|
|
|
|
|
8841
|
|
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::ParentElement'; |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
# if adding non-cell to row, add to previous cell |
349
|
|
|
|
|
|
|
|
350
|
0
|
|
|
0
|
0
|
0
|
sub cells { shift->children } |
351
|
11
|
|
|
11
|
0
|
34
|
sub num_cells { 0 + @{ shift->children } } |
|
11
|
|
|
|
|
440
|
|
352
|
|
|
|
|
|
|
|
353
|
|
|
|
|
|
|
# make sure all kids are cells |
354
|
|
|
|
|
|
|
sub fixup |
355
|
|
|
|
|
|
|
{ |
356
|
72
|
|
|
72
|
0
|
166
|
my $self = shift; |
357
|
72
|
|
|
|
|
2427
|
my $children = $self->children; |
358
|
72
|
|
|
|
|
185
|
my $kidclass = 'Pod::PseudoPod::DOM::Element::TableCell'; |
359
|
72
|
|
|
96
|
|
538
|
my $prev = first { $_->isa( $kidclass ) } @$children; |
|
96
|
|
|
|
|
394
|
|
360
|
|
|
|
|
|
|
|
361
|
72
|
|
|
|
|
253
|
for my $kid (@$children) |
362
|
|
|
|
|
|
|
{ |
363
|
216
|
100
|
|
|
|
700
|
if ($kid->isa( $kidclass )) |
364
|
|
|
|
|
|
|
{ |
365
|
144
|
|
|
|
|
261
|
$prev = $kid; |
366
|
|
|
|
|
|
|
} |
367
|
|
|
|
|
|
|
else |
368
|
|
|
|
|
|
|
{ |
369
|
72
|
|
|
|
|
223
|
$prev->add( $kid ); |
370
|
|
|
|
|
|
|
} |
371
|
|
|
|
|
|
|
} |
372
|
|
|
|
|
|
|
|
373
|
72
|
|
|
|
|
184
|
@$children = grep { $_->isa( $kidclass ) } @$children; |
|
216
|
|
|
|
|
833
|
|
374
|
|
|
|
|
|
|
} |
375
|
|
|
|
|
|
|
} |
376
|
|
|
|
|
|
|
|
377
|
|
|
|
|
|
|
{ |
378
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::TableCell; |
379
|
|
|
|
|
|
|
|
380
|
26
|
|
|
26
|
|
213
|
use Moose; |
|
26
|
|
|
|
|
1692
|
|
|
26
|
|
|
|
|
132
|
|
381
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::ParentElement'; |
383
|
|
|
|
|
|
|
} |
384
|
|
|
|
|
|
|
|
385
|
|
|
|
|
|
|
{ |
386
|
|
|
|
|
|
|
package Pod::PseudoPod::DOM::Element::Document; |
387
|
|
|
|
|
|
|
|
388
|
26
|
|
|
26
|
|
174802
|
use Moose; |
|
26
|
|
|
|
|
63
|
|
|
26
|
|
|
|
|
121
|
|
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
has 'externals', is => 'ro', default => sub { {} }; |
391
|
|
|
|
|
|
|
has 'filename', is => 'ro', default => ''; |
392
|
|
|
|
|
|
|
has 'index', is => 'ro', default => sub { [] }; |
393
|
|
|
|
|
|
|
has 'anchor', is => 'ro', default => sub { [] }; |
394
|
|
|
|
|
|
|
has 'link', is => 'ro', default => sub { [] }; |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
extends 'Pod::PseudoPod::DOM::ParentElement'; |
397
|
|
|
|
|
|
|
} |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
1; |
400
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
__END__ |
402
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
=pod |
404
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
=encoding UTF-8 |
406
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
=head1 NAME |
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
Pod::PseudoPod::DOM::Elements - the base classes for PseudoPod DOM objects |
410
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
=head1 VERSION |
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
version 1.20210620.2040 |
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
=head1 AUTHOR |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
chromatic <chromatic@wgz.org> |
418
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
420
|
|
|
|
|
|
|
|
421
|
|
|
|
|
|
|
This software is copyright (c) 2021 by chromatic. |
422
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
424
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
=cut |