line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Util::Table; |
2
|
170
|
|
|
170
|
|
1841
|
use strict; |
|
170
|
|
|
|
|
328
|
|
|
170
|
|
|
|
|
5180
|
|
3
|
170
|
|
|
170
|
|
904
|
use warnings; |
|
170
|
|
|
|
|
342
|
|
|
170
|
|
|
|
|
7205
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000156'; |
6
|
|
|
|
|
|
|
|
7
|
170
|
|
|
170
|
|
1156
|
use base 'Term::Table'; |
|
170
|
|
|
|
|
378
|
|
|
170
|
|
|
|
|
108631
|
|
8
|
|
|
|
|
|
|
|
9
|
170
|
|
|
170
|
|
11199511
|
use Test2::Util::Importer 'Test2::Util::Importer' => 'import'; |
|
170
|
|
|
|
|
502
|
|
|
170
|
|
|
|
|
1773
|
|
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
|
397
|
|
|
397
|
1
|
19131
|
my %params = @_; |
21
|
|
|
|
|
|
|
|
22
|
397
|
|
100
|
|
|
1319
|
$params{collapse} ||= 0; |
23
|
397
|
|
100
|
|
|
1040
|
$params{sanitize} ||= 0; |
24
|
397
|
|
100
|
|
|
813
|
$params{mark_tail} ||= 0; |
25
|
397
|
100
|
50
|
|
|
937
|
$params{show_header} ||= 0 unless $params{header} && @{$params{header}}; |
|
395
|
|
66
|
|
|
1211
|
|
26
|
|
|
|
|
|
|
|
27
|
397
|
|
|
|
|
1945
|
__PACKAGE__->new(%params)->render; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |