line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Builder::Compat; |
2
|
1
|
|
|
1
|
|
36982
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
42
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
119
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.001002'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
my $HAS_PROVIDER = eval { require Test::Builder::Provider; 1 }; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub import { |
10
|
1
|
|
|
1
|
|
10
|
my $class = shift; |
11
|
1
|
|
|
|
|
3
|
my $caller = caller; |
12
|
1
|
50
|
|
|
|
8
|
my @import = @_ ? @_ : qw/provides nest builder/; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
{ |
15
|
1
|
|
|
1
|
|
6
|
no strict 'refs'; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
213
|
|
|
1
|
|
|
|
|
3
|
|
16
|
1
|
|
|
1
|
|
6
|
*{"$caller\::HAS_PROVIDER"} = sub { $HAS_PROVIDER }; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
1251
|
|
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
1
|
50
|
|
|
|
5
|
return Test::Builder::Provider->export_into($caller, @import) |
20
|
|
|
|
|
|
|
if $HAS_PROVIDER; |
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
|
|
6
|
require Test::Builder; |
23
|
1
|
|
|
1
|
|
5
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
185
|
|
24
|
1
|
|
|
0
|
|
4
|
*{"$caller\::builder"} = sub { Test::Builder->new }; |
|
1
|
|
|
|
|
5
|
|
|
0
|
|
|
|
|
0
|
|
25
|
1
|
|
|
0
|
|
7
|
*{"$caller\::provides"} = sub { 0 }; |
|
1
|
|
|
|
|
5
|
|
|
0
|
|
|
|
|
0
|
|
26
|
1
|
|
|
0
|
|
4
|
*{"$caller\::nest"} = sub(&) { $_[0]->() }; |
|
1
|
|
|
|
|
9726
|
|
|
0
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |