line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::AsyncSubtest::Event::Attach; |
2
|
77
|
|
|
77
|
|
592
|
use strict; |
|
77
|
|
|
|
|
311
|
|
|
77
|
|
|
|
|
2501
|
|
3
|
77
|
|
|
77
|
|
379
|
use warnings; |
|
77
|
|
|
|
|
243
|
|
|
77
|
|
|
|
|
3128
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000155'; |
6
|
|
|
|
|
|
|
|
7
|
77
|
|
|
77
|
|
469
|
use base 'Test2::Event'; |
|
77
|
|
|
|
|
543
|
|
|
77
|
|
|
|
|
9230
|
|
8
|
77
|
|
|
77
|
|
607
|
use Test2::Util::HashBase qw/id/; |
|
77
|
|
|
|
|
280
|
|
|
77
|
|
|
|
|
538
|
|
9
|
|
|
|
|
|
|
|
10
|
801
|
|
|
801
|
1
|
781557
|
sub no_display { 1 } |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub callback { |
13
|
261
|
|
|
261
|
1
|
32974
|
my $self = shift; |
14
|
261
|
|
|
|
|
1382
|
my ($hub) = @_; |
15
|
|
|
|
|
|
|
|
16
|
261
|
|
|
|
|
1122
|
my $id = $self->{+ID}; |
17
|
261
|
|
|
|
|
2525
|
my $ids = $hub->ast_ids; |
18
|
|
|
|
|
|
|
|
19
|
261
|
100
|
|
|
|
2945
|
unless (defined $ids->{$id}) { |
20
|
1
|
|
|
|
|
6
|
require Test2::Event::Exception; |
21
|
1
|
|
|
|
|
8
|
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
|
|
|
|
|
261
|
return; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
260
|
100
|
|
|
|
2502
|
if ($ids->{$id}++) { |
32
|
1
|
|
|
|
|
7
|
require Test2::Event::Exception; |
33
|
1
|
|
|
|
|
4
|
my $trace = $self->trace; |
34
|
1
|
|
|
|
|
9
|
$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
|
|
|
|
|
195
|
return; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |