line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::AsyncSubtest::Event::Attach; |
2
|
77
|
|
|
77
|
|
526
|
use strict; |
|
77
|
|
|
|
|
155
|
|
|
77
|
|
|
|
|
2159
|
|
3
|
77
|
|
|
77
|
|
378
|
use warnings; |
|
77
|
|
|
|
|
144
|
|
|
77
|
|
|
|
|
3158
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000153'; |
6
|
|
|
|
|
|
|
|
7
|
77
|
|
|
77
|
|
449
|
use base 'Test2::Event'; |
|
77
|
|
|
|
|
138
|
|
|
77
|
|
|
|
|
8747
|
|
8
|
77
|
|
|
77
|
|
547
|
use Test2::Util::HashBase qw/id/; |
|
77
|
|
|
|
|
223
|
|
|
77
|
|
|
|
|
509
|
|
9
|
|
|
|
|
|
|
|
10
|
835
|
|
|
835
|
1
|
593165
|
sub no_display { 1 } |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub callback { |
13
|
264
|
|
|
264
|
1
|
24971
|
my $self = shift; |
14
|
264
|
|
|
|
|
1020
|
my ($hub) = @_; |
15
|
|
|
|
|
|
|
|
16
|
264
|
|
|
|
|
1013
|
my $id = $self->{+ID}; |
17
|
264
|
|
|
|
|
1727
|
my $ids = $hub->ast_ids; |
18
|
|
|
|
|
|
|
|
19
|
264
|
100
|
|
|
|
2440
|
unless (defined $ids->{$id}) { |
20
|
1
|
|
|
|
|
6
|
require Test2::Event::Exception; |
21
|
1
|
|
|
|
|
5
|
my $trace = $self->trace; |
22
|
1
|
|
|
|
|
11
|
$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
|
|
|
|
|
287
|
return; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
263
|
100
|
|
|
|
1458
|
if ($ids->{$id}++) { |
32
|
1
|
|
|
|
|
8
|
require Test2::Event::Exception; |
33
|
1
|
|
|
|
|
3
|
my $trace = $self->trace; |
34
|
1
|
|
|
|
|
21
|
$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
|
|
|
|
|
196
|
return; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |