line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormatNroff::Table; |
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
2669
|
use 5.004; |
|
7
|
|
|
|
|
15
|
|
|
7
|
|
|
|
|
225
|
|
4
|
7
|
|
|
7
|
|
25
|
use strict; |
|
7
|
|
|
|
|
8
|
|
|
7
|
|
|
|
|
179
|
|
5
|
7
|
|
|
7
|
|
32
|
use warnings; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
140
|
|
6
|
7
|
|
|
7
|
|
24
|
use Carp; |
|
7
|
|
|
|
|
12
|
|
|
7
|
|
|
|
|
1876
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
3
|
|
|
3
|
1
|
8
|
my ( $class, $formatter, %attr ) = @_; |
10
|
|
|
|
|
|
|
|
11
|
3
|
|
50
|
|
|
55
|
my $self = bless { |
12
|
|
|
|
|
|
|
formatter => $formatter, |
13
|
|
|
|
|
|
|
align => $attr{'align'} || 'left', |
14
|
|
|
|
|
|
|
width => $attr{'width'}, |
15
|
|
|
|
|
|
|
page_width => $attr{'page_width'}, |
16
|
|
|
|
|
|
|
tab => '%', |
17
|
|
|
|
|
|
|
border => 1, |
18
|
|
|
|
|
|
|
previous_rows => [], |
19
|
|
|
|
|
|
|
current_row => undef, |
20
|
|
|
|
|
|
|
data => [], |
21
|
|
|
|
|
|
|
}, $class; |
22
|
|
|
|
|
|
|
|
23
|
3
|
|
|
|
|
18
|
return $self; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub end_row { |
27
|
0
|
|
|
0
|
1
|
0
|
my ($self) = @_; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
0
|
$self->{"current_row"} = pop( @{ $self->{'previous_rows'} } ); |
|
0
|
|
|
|
|
0
|
|
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub start_data { |
33
|
13
|
|
|
13
|
1
|
32
|
my ( $self, %attr ) = @_; |
34
|
|
|
|
|
|
|
|
35
|
13
|
|
|
|
|
48
|
$self->{"current_row"}->add_element(%attr); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub end_data { |
39
|
13
|
|
|
13
|
1
|
18
|
my ($self) = @_; |
40
|
|
|
|
|
|
|
|
41
|
13
|
|
|
|
|
51
|
$self->{"current_row"}->end_element(); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub add_text { |
45
|
24
|
|
|
24
|
1
|
29
|
my ( $self, $text ) = @_; |
46
|
|
|
|
|
|
|
|
47
|
24
|
50
|
33
|
|
|
131
|
if ( defined( $self->{"current_row"} ) |
48
|
|
|
|
|
|
|
&& $self->{"current_row"} ne "" ) { |
49
|
24
|
|
|
|
|
74
|
$self->{"current_row"}->add_text($text); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
else { |
52
|
0
|
|
|
|
|
|
return 0; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |