line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#line 1 |
2
|
1
|
|
|
1
|
|
7
|
package Test::SharedFork; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
46
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
136
|
|
5
|
|
|
|
|
|
|
use base 'Test::Builder::Module'; |
6
|
1
|
|
|
1
|
|
6
|
our $VERSION = '0.09'; |
|
1
|
|
|
|
|
38
|
|
|
1
|
|
|
|
|
32
|
|
7
|
1
|
|
|
1
|
|
784
|
use Test::Builder 0.32; # 0.32 or later is needed |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
35
|
|
8
|
1
|
|
|
1
|
|
14825
|
use Test::SharedFork::Scalar; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
52
|
|
9
|
1
|
|
|
1
|
|
2033
|
use Test::SharedFork::Array; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
136
|
|
10
|
|
|
|
|
|
|
use Test::SharedFork::Store; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $STORE; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
BEGIN { |
15
|
|
|
|
|
|
|
$STORE = Test::SharedFork::Store->new( |
16
|
1
|
|
|
|
|
1
|
cb => sub { |
17
|
1
|
|
|
|
|
16
|
my $store = shift; |
18
|
1
|
|
|
|
|
11
|
tie __PACKAGE__->builder->{Curr_Test}, 'Test::SharedFork::Scalar', 0, $store; |
|
1
|
|
|
|
|
11
|
|
19
|
|
|
|
|
|
|
tie @{ __PACKAGE__->builder->{Test_Results} }, 'Test::SharedFork::Array', $store; |
20
|
1
|
|
|
1
|
|
8
|
} |
21
|
|
|
|
|
|
|
); |
22
|
1
|
|
|
1
|
|
8
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
53
|
|
23
|
1
|
|
|
1
|
|
7
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
160
|
|
24
|
1
|
|
|
|
|
6
|
no warnings 'redefine'; |
25
|
4
|
|
|
|
|
7
|
for my $name (qw/ok skip todo_skip current_test/) { |
|
4
|
|
|
|
|
71
|
|
26
|
4
|
|
|
|
|
130
|
my $orig = *{"Test::Builder::${name}"}{CODE}; |
27
|
8
|
|
|
8
|
|
24
|
*{"Test::Builder::${name}"} = sub { |
28
|
|
|
|
|
|
|
my @args = @_; |
29
|
8
|
|
|
8
|
|
63
|
$STORE->lock_cb(sub { |
30
|
8
|
|
|
|
|
103
|
$orig->(@args); |
31
|
4
|
|
|
|
|
18
|
}); |
32
|
|
|
|
|
|
|
}; |
33
|
|
|
|
|
|
|
}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
{ |
37
|
0
|
|
|
0
|
0
|
0
|
# backward compatibility method |
38
|
0
|
|
|
0
|
0
|
0
|
sub parent { } |
39
|
1
|
|
|
1
|
0
|
4440
|
sub child { } |
40
|
|
|
|
|
|
|
sub fork { fork() } |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
__END__ |