line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyright (C) 2003-2007, G. Allen Morris III, all rights reserved |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
19
|
use strict; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
158
|
|
4
|
|
|
|
|
|
|
package |
5
|
|
|
|
|
|
|
Data::Tabular::Row::Totals; |
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
15
|
use base 'Data::Tabular::Row::Function'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
2286
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub get_column |
10
|
|
|
|
|
|
|
{ |
11
|
127
|
|
|
127
|
0
|
184
|
my $self = shift; |
12
|
127
|
|
|
|
|
187
|
my $column_name = shift; |
13
|
127
|
|
|
|
|
154
|
my $ret; |
14
|
127
|
|
|
|
|
2528
|
my $reg = qr|^$column_name$|; |
15
|
|
|
|
|
|
|
|
16
|
127
|
100
|
|
|
|
349
|
if ($column_name eq '_description') { |
|
108
|
100
|
|
|
|
649
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
17
|
19
|
|
|
|
|
114
|
$ret = Data::Tabular::Type::Text->new( |
18
|
|
|
|
|
|
|
data => $self->{text}, |
19
|
|
|
|
|
|
|
type => 'description', |
20
|
|
|
|
|
|
|
); |
21
|
19
|
50
|
|
|
|
267
|
} elsif (grep(m|$reg|, @{$self->sum_list})) { |
22
|
89
|
|
|
|
|
297
|
$ret = $self->table->column_sum($column_name); |
23
|
|
|
|
|
|
|
} elsif (grep(m|$reg|, @{$self->{extra}->{headers} || []})) { |
24
|
0
|
|
|
|
|
0
|
die; |
25
|
0
|
|
|
|
|
0
|
$ret = "extra($column_name)"; |
26
|
|
|
|
|
|
|
} elsif ($column_name eq '_filler') { |
27
|
19
|
|
|
|
|
40
|
$ret = undef; |
28
|
19
|
|
|
|
|
85
|
$ret = Data::Tabular::Type::Text->new( |
29
|
|
|
|
|
|
|
data => '', |
30
|
|
|
|
|
|
|
type => 'filler', |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
} else { |
33
|
0
|
|
|
|
|
0
|
$ret = 'N/A('. $column_name . ')'; |
34
|
|
|
|
|
|
|
} |
35
|
127
|
|
|
|
|
779
|
$ret; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
__END__ |