line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: $ |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
package CHI::Test; |
4
|
|
|
|
|
|
|
$CHI::Test::VERSION = '0.61'; |
5
|
20
|
|
|
20
|
|
8660
|
use Log::Any::Test; # as early as possible |
|
20
|
|
|
|
|
4916
|
|
|
20
|
|
|
|
|
627
|
|
6
|
20
|
|
|
20
|
|
11225
|
use List::MoreUtils qw(uniq); |
|
20
|
|
|
|
|
292907
|
|
|
20
|
|
|
|
|
133
|
|
7
|
20
|
|
|
20
|
|
38739
|
use Module::Runtime qw(require_module); |
|
20
|
|
|
|
|
43746
|
|
|
20
|
|
|
|
|
143
|
|
8
|
20
|
|
|
20
|
|
14811
|
use CHI; |
|
20
|
|
|
|
|
69
|
|
|
20
|
|
|
|
|
806
|
|
9
|
20
|
|
|
20
|
|
10695
|
use CHI::Driver::Memory; |
|
20
|
|
|
|
|
80
|
|
|
20
|
|
|
|
|
970
|
|
10
|
20
|
|
|
20
|
|
167
|
use strict; |
|
20
|
|
|
|
|
45
|
|
|
20
|
|
|
|
|
497
|
|
11
|
20
|
|
|
20
|
|
101
|
use warnings; |
|
20
|
|
|
|
|
45
|
|
|
20
|
|
|
|
|
3542
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub import { |
14
|
34
|
|
|
34
|
|
85
|
my $class = shift; |
15
|
34
|
|
|
|
|
131
|
$class->export_to_level( 1, undef, @_ ); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub packages_to_import { |
19
|
|
|
|
|
|
|
return ( |
20
|
34
|
|
|
34
|
0
|
111
|
qw( |
21
|
|
|
|
|
|
|
Test::Deep |
22
|
|
|
|
|
|
|
Test::More |
23
|
|
|
|
|
|
|
Test::Exception |
24
|
|
|
|
|
|
|
CHI::Test::Util |
25
|
|
|
|
|
|
|
) |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub export_to_level { |
30
|
34
|
|
|
34
|
0
|
104
|
my ( $class, $level, $ignore ) = @_; |
31
|
|
|
|
|
|
|
|
32
|
34
|
|
|
|
|
108
|
foreach my $package ( $class->packages_to_import() ) { |
33
|
136
|
|
|
|
|
781
|
require_module($package); |
34
|
136
|
|
|
|
|
412433
|
my @export; |
35
|
136
|
100
|
|
|
|
473
|
if ( $package eq 'Test::Deep' ) { |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# Test::Deep exports way too much by default |
38
|
34
|
|
|
|
|
154
|
@export = |
39
|
|
|
|
|
|
|
qw(eq_deeply cmp_deeply cmp_set cmp_bag cmp_methods subbagof superbagof subsetof supersetof superhashof subhashof); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
else { |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
# Otherwise, grab everything from @EXPORT |
44
|
20
|
|
|
20
|
|
174
|
no strict 'refs'; |
|
20
|
|
|
|
|
43
|
|
|
20
|
|
|
|
|
2715
|
|
45
|
102
|
|
|
|
|
204
|
@export = @{"$package\::EXPORT"}; |
|
102
|
|
|
|
|
683
|
|
46
|
|
|
|
|
|
|
} |
47
|
136
|
|
|
|
|
18054
|
$package->export_to_level( $level + 1, undef, @export ); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |