line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyright (C) 2003-2007, G. Allen Morris III, all rights reserved |
2
|
|
|
|
|
|
|
|
3
|
5
|
|
|
5
|
|
31
|
use strict; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
255
|
|
4
|
|
|
|
|
|
|
package |
5
|
|
|
|
|
|
|
Data::Tabular::Row::Header; |
6
|
|
|
|
|
|
|
|
7
|
5
|
|
|
5
|
|
28
|
use base 'Data::Tabular::Row'; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
438
|
|
8
|
|
|
|
|
|
|
|
9
|
5
|
|
|
5
|
|
44
|
use Carp qw(croak); |
|
5
|
|
|
|
|
19
|
|
|
5
|
|
|
|
|
833
|
|
10
|
|
|
|
|
|
|
|
11
|
5
|
|
|
|
|
151
|
use overload '@{}' => \&array, |
12
|
5
|
|
|
5
|
|
42
|
'""' => \&str; |
|
5
|
|
|
|
|
7
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub str |
15
|
|
|
|
|
|
|
{ |
16
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
17
|
0
|
|
|
|
|
0
|
__PACKAGE__; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub headers |
21
|
|
|
|
|
|
|
{ |
22
|
80
|
|
|
80
|
0
|
141
|
my $self = shift; |
23
|
80
|
|
|
|
|
270
|
qw ( _header ); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub colspan |
27
|
|
|
|
|
|
|
{ |
28
|
80
|
|
|
80
|
0
|
237
|
my $self = shift; |
29
|
80
|
|
|
|
|
116
|
my $header = shift; |
30
|
80
|
50
|
|
|
|
324
|
die 'unknown column ' . $header unless $header eq '_header'; |
31
|
|
|
|
|
|
|
|
32
|
80
|
|
|
|
|
286
|
scalar($self->output->headers); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub table |
36
|
|
|
|
|
|
|
{ |
37
|
240
|
|
|
240
|
0
|
351
|
my $self = shift; |
38
|
240
|
|
|
|
|
7206
|
$self->{table}; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub get_column |
42
|
|
|
|
|
|
|
{ |
43
|
80
|
|
|
80
|
0
|
129
|
my $self = shift; |
44
|
80
|
|
|
|
|
124
|
my $column_name = shift; |
45
|
80
|
50
|
|
|
|
219
|
die 'unknown column ' . $column_name unless $column_name eq '_header'; |
46
|
|
|
|
|
|
|
|
47
|
80
|
|
|
|
|
628
|
Data::Tabular::Type::Text->new( |
48
|
|
|
|
|
|
|
data => $self->{text}, |
49
|
|
|
|
|
|
|
type => 'header', |
50
|
|
|
|
|
|
|
); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub hdr |
54
|
|
|
|
|
|
|
{ |
55
|
17
|
|
|
17
|
0
|
60
|
my $self = shift; |
56
|
17
|
50
|
|
|
|
81
|
defined $self->{header} ? $self->{header} : 1; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub cell_html_attributes |
60
|
|
|
|
|
|
|
{ |
61
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
62
|
0
|
|
|
|
|
|
my $cell = shift; |
63
|
0
|
|
|
|
|
|
my $column_name = $cell->name(); |
64
|
0
|
0
|
|
|
|
|
die 'unknown column ' . $column_name unless $column_name eq '_header'; |
65
|
0
|
|
|
|
|
|
my $span = $self->output->headers; |
66
|
|
|
|
|
|
|
{ |
67
|
0
|
|
|
|
|
|
align => 'left', |
68
|
|
|
|
|
|
|
colspan => $span, |
69
|
|
|
|
|
|
|
}; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub type |
73
|
|
|
|
|
|
|
{ |
74
|
0
|
|
|
0
|
0
|
|
'header'; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
1; |
78
|
|
|
|
|
|
|
__END__ |