line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Tabulate::Plugin::ASCIITable; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: generate ASCII tables with Data::Tabulate |
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
21432
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
55
|
|
6
|
2
|
|
|
2
|
|
9
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
53
|
|
7
|
2
|
|
|
2
|
|
1681
|
use Text::Table::Tiny; |
|
2
|
|
|
|
|
1875
|
|
|
2
|
|
|
|
|
297
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new{ |
13
|
0
|
|
|
0
|
1
|
|
return bless {}, shift; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub output{ |
18
|
0
|
|
|
0
|
1
|
|
my ($self,@data) = @_; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my $table = Text::Table::Tiny::table( rows => \@data ); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# some minor changes to generate the same output as the 0.01 version |
23
|
|
|
|
|
|
|
# with Text::ASCIITable 0.17 |
24
|
0
|
|
|
|
|
|
$table =~ s/\+([+-]+)\+\n/.$1.\n/; |
25
|
0
|
|
|
|
|
|
$table =~ s/\+([+-]+)\+\z/'$1'\n/ms; |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
return $table; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; # End of Data::Tabulate::Plugin::ASCIITable |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |