line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Util::Table; |
2
|
169
|
|
|
169
|
|
1644
|
use strict; |
|
169
|
|
|
|
|
341
|
|
|
169
|
|
|
|
|
4592
|
|
3
|
169
|
|
|
169
|
|
870
|
use warnings; |
|
169
|
|
|
|
|
324
|
|
|
169
|
|
|
|
|
6815
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000153'; |
6
|
|
|
|
|
|
|
|
7
|
169
|
|
|
169
|
|
937
|
use base 'Term::Table'; |
|
169
|
|
|
|
|
391
|
|
|
169
|
|
|
|
|
84064
|
|
8
|
|
|
|
|
|
|
|
9
|
169
|
|
|
169
|
|
11245584
|
use Test2::Util::Importer 'Test2::Util::Importer' => 'import'; |
|
169
|
|
|
|
|
483
|
|
|
169
|
|
|
|
|
1583
|
|
10
|
|
|
|
|
|
|
our @EXPORT_OK = qw/table/; |
11
|
|
|
|
|
|
|
our %EXPORT_GEN = ( |
12
|
|
|
|
|
|
|
'&term_size' => sub { |
13
|
|
|
|
|
|
|
require Carp; |
14
|
|
|
|
|
|
|
Carp::cluck "term_size should be imported from Test2::Util::Term, not " . __PACKAGE__; |
15
|
|
|
|
|
|
|
Test2::Util::Term->can('term_size'); |
16
|
|
|
|
|
|
|
}, |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub table { |
20
|
379
|
|
|
379
|
1
|
6358
|
my %params = @_; |
21
|
|
|
|
|
|
|
|
22
|
379
|
|
100
|
|
|
1141
|
$params{collapse} ||= 0; |
23
|
379
|
|
100
|
|
|
881
|
$params{sanitize} ||= 0; |
24
|
379
|
|
100
|
|
|
712
|
$params{mark_tail} ||= 0; |
25
|
379
|
100
|
50
|
|
|
814
|
$params{show_header} ||= 0 unless $params{header} && @{$params{header}}; |
|
377
|
|
66
|
|
|
921
|
|
26
|
|
|
|
|
|
|
|
27
|
379
|
|
|
|
|
1633
|
__PACKAGE__->new(%params)->render; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |