line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id: $ |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
package CHI::Test; |
4
|
|
|
|
|
|
|
$CHI::Test::VERSION = '0.60'; |
5
|
20
|
|
|
20
|
|
10452
|
use Log::Any::Test; # as early as possible |
|
20
|
|
|
|
|
477579
|
|
|
20
|
|
|
|
|
658
|
|
6
|
20
|
|
|
20
|
|
11819
|
use List::MoreUtils qw(uniq); |
|
20
|
|
|
|
|
200529
|
|
|
20
|
|
|
|
|
169
|
|
7
|
20
|
|
|
20
|
|
22148
|
use Module::Runtime qw(require_module); |
|
20
|
|
|
|
|
26729
|
|
|
20
|
|
|
|
|
123
|
|
8
|
20
|
|
|
20
|
|
11345
|
use CHI; |
|
20
|
|
|
|
|
63
|
|
|
20
|
|
|
|
|
700
|
|
9
|
20
|
|
|
20
|
|
9572
|
use CHI::Driver::Memory; |
|
20
|
|
|
|
|
72
|
|
|
20
|
|
|
|
|
960
|
|
10
|
20
|
|
|
20
|
|
157
|
use strict; |
|
20
|
|
|
|
|
44
|
|
|
20
|
|
|
|
|
744
|
|
11
|
20
|
|
|
20
|
|
99
|
use warnings; |
|
20
|
|
|
|
|
34
|
|
|
20
|
|
|
|
|
3136
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub import { |
14
|
34
|
|
|
34
|
|
76
|
my $class = shift; |
15
|
34
|
|
|
|
|
128
|
$class->export_to_level( 1, undef, @_ ); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub packages_to_import { |
19
|
|
|
|
|
|
|
return ( |
20
|
34
|
|
|
34
|
0
|
110
|
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
|
64
|
my ( $class, $level, $ignore ) = @_; |
31
|
|
|
|
|
|
|
|
32
|
34
|
|
|
|
|
96
|
foreach my $package ( $class->packages_to_import() ) { |
33
|
136
|
|
|
|
|
580
|
require_module($package); |
34
|
136
|
|
|
|
|
367312
|
my @export; |
35
|
136
|
100
|
|
|
|
456
|
if ( $package eq 'Test::Deep' ) { |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# Test::Deep exports way too much by default |
38
|
34
|
|
|
|
|
191
|
@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
|
|
105
|
no strict 'refs'; |
|
20
|
|
|
|
|
32
|
|
|
20
|
|
|
|
|
2024
|
|
45
|
102
|
|
|
|
|
153
|
@export = @{"$package\::EXPORT"}; |
|
102
|
|
|
|
|
644
|
|
46
|
|
|
|
|
|
|
} |
47
|
136
|
|
|
|
|
18361
|
$package->export_to_level( $level + 1, undef, @export ); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |