line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Tabulate::Plugin::HTMLTable; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
53656
|
use warnings; |
|
3
|
|
|
|
|
15
|
|
|
3
|
|
|
|
|
83
|
|
4
|
3
|
|
|
3
|
|
14
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
47
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
2292
|
use HTML::Table; |
|
3
|
|
|
|
|
54757
|
|
|
3
|
|
|
|
|
590
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# ABSTRACT: HTML::Table plugin for Data::Tabulate |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.05'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new{ |
14
|
2
|
|
|
2
|
1
|
4725
|
return bless {},shift; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub output { |
19
|
2
|
|
|
2
|
1
|
16
|
my ($self,@data) = @_; |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
6
|
my %atts = $self->attributes(); |
22
|
2
|
|
|
|
|
15
|
my $obj = HTML::Table->new(%atts); |
23
|
|
|
|
|
|
|
|
24
|
2
|
|
|
|
|
131
|
for my $row_data ( @data ){ |
25
|
8
|
100
|
|
|
|
165
|
my @row = map{ defined $_ ? $_ : ' ' }@{$row_data}; |
|
24
|
|
|
|
|
46
|
|
|
8
|
|
|
|
|
15
|
|
26
|
8
|
|
|
|
|
19
|
$obj->addRow(@row); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
2
|
|
|
|
|
55
|
return $obj->getTable(); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub attributes{ |
34
|
3
|
|
|
3
|
1
|
22
|
my ($self,%atts) = @_; |
35
|
|
|
|
|
|
|
|
36
|
3
|
100
|
|
|
|
15
|
$self->{attributes} = {%atts} if keys %atts; |
37
|
|
|
|
|
|
|
|
38
|
3
|
100
|
|
|
|
6
|
my %return = %{ $self->{attributes} || {} }; |
|
3
|
|
|
|
|
15
|
|
39
|
|
|
|
|
|
|
|
40
|
3
|
|
|
|
|
10
|
return %return; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; # End of Data::Tabulate::Plugin::HTMLTable |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__END__ |