line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::AsyncSubtest::Event::Attach; |
2
|
30
|
|
|
30
|
|
93007
|
use strict; |
|
30
|
|
|
|
|
33
|
|
|
30
|
|
|
|
|
738
|
|
3
|
30
|
|
|
30
|
|
83
|
use warnings; |
|
30
|
|
|
|
|
36
|
|
|
30
|
|
|
|
|
1007
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000018'; |
6
|
|
|
|
|
|
|
|
7
|
30
|
|
|
30
|
|
102
|
use base 'Test2::Event'; |
|
30
|
|
|
|
|
36
|
|
|
30
|
|
|
|
|
1938
|
|
8
|
30
|
|
|
30
|
|
127
|
use Test2::Util::HashBase qw/id/; |
|
30
|
|
|
|
|
34
|
|
|
30
|
|
|
|
|
157
|
|
9
|
|
|
|
|
|
|
|
10
|
0
|
|
|
0
|
1
|
0
|
sub no_display { 1 } |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub callback { |
13
|
143
|
|
|
143
|
1
|
116072
|
my $self = shift; |
14
|
143
|
|
|
|
|
225
|
my ($hub) = @_; |
15
|
|
|
|
|
|
|
|
16
|
143
|
|
|
|
|
366
|
my $id = $self->{+ID}; |
17
|
143
|
|
|
|
|
736
|
my $ids = $hub->ast_ids; |
18
|
|
|
|
|
|
|
|
19
|
143
|
100
|
|
|
|
857
|
unless (defined $ids->{$id}) { |
20
|
1
|
|
|
|
|
5
|
require Test2::Event::Exception; |
21
|
1
|
|
|
|
|
5
|
my $trace = $self->trace; |
22
|
1
|
|
|
|
|
7
|
$hub->send( |
23
|
|
|
|
|
|
|
Test2::Event::Exception->new( |
24
|
|
|
|
|
|
|
trace => $trace, |
25
|
|
|
|
|
|
|
error => "Invalid AsyncSubtest attach ID: $id at " . $trace->debug . "\n", |
26
|
|
|
|
|
|
|
) |
27
|
|
|
|
|
|
|
); |
28
|
1
|
|
|
|
|
102
|
return; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
142
|
100
|
|
|
|
606
|
if ($ids->{$id}++) { |
32
|
1
|
|
|
|
|
6
|
require Test2::Event::Exception; |
33
|
1
|
|
|
|
|
4
|
my $trace = $self->trace; |
34
|
1
|
|
|
|
|
8
|
$hub->send( |
35
|
|
|
|
|
|
|
Test2::Event::Exception->new( |
36
|
|
|
|
|
|
|
trace => $trace, |
37
|
|
|
|
|
|
|
error => "AsyncSubtest ID $id already attached at " . $trace->debug . "\n", |
38
|
|
|
|
|
|
|
) |
39
|
|
|
|
|
|
|
); |
40
|
1
|
|
|
|
|
81
|
return; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |