line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#line 1 |
2
|
|
|
|
|
|
|
package Test::Builder::Module; |
3
|
6
|
|
|
6
|
|
36
|
|
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
153
|
|
4
|
|
|
|
|
|
|
use strict; |
5
|
6
|
|
|
6
|
|
8790
|
|
|
6
|
|
|
|
|
17
|
|
|
6
|
|
|
|
|
1735
|
|
6
|
|
|
|
|
|
|
use Test::Builder; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
require Exporter; |
9
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '1.302170'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
#line 73 |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub import { |
17
|
|
|
|
|
|
|
my($class) = shift; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
Test2::API::test2_load() unless Test2::API::test2_in_preload(); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Don't run all this when loading ourself. |
22
|
|
|
|
|
|
|
return 1 if $class eq 'Test::Builder::Module'; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
my $test = $class->builder; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
my $caller = caller; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
$test->exported_to($caller); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
$class->import_extra( \@_ ); |
31
|
|
|
|
|
|
|
my(@imports) = $class->_strip_imports( \@_ ); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
$test->plan(@_); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
local $Exporter::ExportLevel = $Exporter::ExportLevel + 1; |
36
|
|
|
|
|
|
|
$class->Exporter::import(@imports); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub _strip_imports { |
40
|
|
|
|
|
|
|
my $class = shift; |
41
|
|
|
|
|
|
|
my $list = shift; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
my @imports = (); |
44
|
|
|
|
|
|
|
my @other = (); |
45
|
|
|
|
|
|
|
my $idx = 0; |
46
|
|
|
|
|
|
|
while( $idx <= $#{$list} ) { |
47
|
|
|
|
|
|
|
my $item = $list->[$idx]; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
if( defined $item and $item eq 'import' ) { |
50
|
|
|
|
|
|
|
push @imports, @{ $list->[ $idx + 1 ] }; |
51
|
|
|
|
|
|
|
$idx++; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
else { |
54
|
|
|
|
|
|
|
push @other, $item; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
$idx++; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
@$list = @other; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
return @imports; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
#line 139 |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub import_extra { } |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
#line 169 |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub builder { |
72
|
|
|
|
|
|
|
return Test::Builder->new; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
12
|
|
|
12
|
|
44
|
#line 180 |
76
|
|
|
|
|
|
|
|
77
|
12
|
50
|
|
|
|
43
|
1; |