line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Util::Table; |
2
|
170
|
|
|
170
|
|
1682
|
use strict; |
|
170
|
|
|
|
|
374
|
|
|
170
|
|
|
|
|
4806
|
|
3
|
170
|
|
|
170
|
|
849
|
use warnings; |
|
170
|
|
|
|
|
379
|
|
|
170
|
|
|
|
|
7069
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000155'; |
6
|
|
|
|
|
|
|
|
7
|
170
|
|
|
170
|
|
1060
|
use base 'Term::Table'; |
|
170
|
|
|
|
|
568
|
|
|
170
|
|
|
|
|
93018
|
|
8
|
|
|
|
|
|
|
|
9
|
170
|
|
|
170
|
|
12205673
|
use Test2::Util::Importer 'Test2::Util::Importer' => 'import'; |
|
170
|
|
|
|
|
503
|
|
|
170
|
|
|
|
|
1860
|
|
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
|
381
|
|
|
381
|
1
|
6991
|
my %params = @_; |
21
|
|
|
|
|
|
|
|
22
|
381
|
|
100
|
|
|
1367
|
$params{collapse} ||= 0; |
23
|
381
|
|
100
|
|
|
890
|
$params{sanitize} ||= 0; |
24
|
381
|
|
100
|
|
|
837
|
$params{mark_tail} ||= 0; |
25
|
381
|
100
|
50
|
|
|
1079
|
$params{show_header} ||= 0 unless $params{header} && @{$params{header}}; |
|
379
|
|
66
|
|
|
1180
|
|
26
|
|
|
|
|
|
|
|
27
|
381
|
|
|
|
|
1932
|
__PACKAGE__->new(%params)->render; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |