line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Hub::Interceptor; |
2
|
57
|
|
|
57
|
|
495
|
use strict; |
|
57
|
|
|
|
|
46
|
|
|
57
|
|
|
|
|
1827
|
|
3
|
57
|
|
|
57
|
|
166
|
use warnings; |
|
57
|
|
|
|
|
47
|
|
|
57
|
|
|
|
|
2131
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000043'; |
6
|
|
|
|
|
|
|
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) |
7
|
|
|
|
|
|
|
|
8
|
57
|
|
|
57
|
|
18370
|
use Test2::Hub::Interceptor::Terminator(); |
|
57
|
|
|
|
|
79
|
|
|
57
|
|
|
|
|
955
|
|
9
|
|
|
|
|
|
|
|
10
|
57
|
|
|
57
|
|
236
|
use base 'Test2::Hub'; |
|
57
|
|
|
|
|
56
|
|
|
57
|
|
|
|
|
3115
|
|
11
|
57
|
|
|
57
|
|
224
|
use Test2::Util::HashBase; |
|
57
|
|
|
|
|
61
|
|
|
57
|
|
|
|
|
258
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub inherit { |
14
|
13
|
|
|
13
|
0
|
14
|
my $self = shift; |
15
|
13
|
|
|
|
|
14
|
my ($from, %params) = @_; |
16
|
|
|
|
|
|
|
|
17
|
13
|
50
|
66
|
|
|
57
|
if ($from->{+IPC} && !$self->{+IPC} && !exists($params{ipc})) { |
|
|
|
33
|
|
|
|
|
18
|
0
|
|
|
|
|
0
|
my $ipc = $from->{+IPC}; |
19
|
0
|
|
|
|
|
0
|
$self->{+IPC} = $ipc; |
20
|
0
|
|
|
|
|
0
|
$ipc->add_hub($self->{+HID}); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub terminate { |
25
|
3
|
|
|
3
|
0
|
19
|
my $self = shift; |
26
|
3
|
|
|
|
|
4
|
my ($code) = @_; |
27
|
3
|
|
|
|
|
26
|
die bless(\$code, 'Test2::Hub::Interceptor::Terminator'); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |