line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# You may distribute under the terms of either the GNU General Public License |
2
|
|
|
|
|
|
|
# or the Artistic License (the same terms as Perl itself) |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# (C) Paul Evans, 2021-2022 -- leonerd@leonerd.org.uk |
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
49
|
use v5.26; |
|
4
|
|
|
|
|
14
|
|
7
|
4
|
|
|
4
|
|
20
|
use warnings; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
142
|
|
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
23
|
use Object::Pad 0.800; |
|
4
|
|
|
|
|
38
|
|
|
4
|
|
|
|
|
160
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
package App::sdview::Output 0.13; |
12
|
|
|
|
|
|
|
role App::sdview::Output; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
field $_content; |
15
|
|
|
|
|
|
|
|
16
|
116
|
|
|
116
|
0
|
4647
|
method say ( @s ) { $_content .= join "", @s, "\n"; } |
|
116
|
|
|
116
|
0
|
155
|
|
|
116
|
|
|
0
|
0
|
182
|
|
|
116
|
|
|
0
|
0
|
138
|
|
|
116
|
|
|
|
|
467
|
|
17
|
|
|
|
|
|
|
|
18
|
28
|
100
|
|
28
|
0
|
58
|
method maybe_blank { $_content .= "\n" if length $_content; } |
|
28
|
|
|
28
|
0
|
89
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
19
|
|
|
|
|
|
|
|
20
|
17
|
|
|
|
|
28
|
method generate ( @paragraphs ) |
|
17
|
|
|
|
|
33
|
|
|
17
|
|
|
|
|
23
|
|
21
|
17
|
|
|
17
|
0
|
81
|
{ |
|
|
|
|
17
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
22
|
17
|
|
|
|
|
30
|
$_content = ""; |
23
|
|
|
|
|
|
|
|
24
|
17
|
|
|
|
|
57
|
while ( @paragraphs ) { |
25
|
38
|
|
|
|
|
70
|
my $para = shift @paragraphs; |
26
|
|
|
|
|
|
|
|
27
|
38
|
50
|
|
|
|
145
|
if( my $code = $self->can( "output_" . ( $para->type =~ s/-/_/gr ) ) ) { |
28
|
38
|
|
|
|
|
148
|
$self->$code( $para ); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
else { |
31
|
0
|
|
|
|
|
0
|
die "Unhandled paragraph type " . $para->type; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
17
|
|
|
|
|
54
|
return $_content; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
method output ( @paragraphs ) |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
39
|
0
|
|
|
0
|
0
|
|
{ |
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
40
|
0
|
|
|
|
|
|
say $self->generate( @paragraphs ); |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
0x55AA; |