line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::AsyncSubtest::Event::Attach; |
2
|
77
|
|
|
77
|
|
538
|
use strict; |
|
77
|
|
|
|
|
408
|
|
|
77
|
|
|
|
|
2284
|
|
3
|
77
|
|
|
77
|
|
393
|
use warnings; |
|
77
|
|
|
|
|
174
|
|
|
77
|
|
|
|
|
3125
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000156'; |
6
|
|
|
|
|
|
|
|
7
|
77
|
|
|
77
|
|
415
|
use base 'Test2::Event'; |
|
77
|
|
|
|
|
201
|
|
|
77
|
|
|
|
|
8808
|
|
8
|
77
|
|
|
77
|
|
548
|
use Test2::Util::HashBase qw/id/; |
|
77
|
|
|
|
|
221
|
|
|
77
|
|
|
|
|
512
|
|
9
|
|
|
|
|
|
|
|
10
|
798
|
|
|
798
|
1
|
656125
|
sub no_display { 1 } |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub callback { |
13
|
258
|
|
|
258
|
1
|
26607
|
my $self = shift; |
14
|
258
|
|
|
|
|
1111
|
my ($hub) = @_; |
15
|
|
|
|
|
|
|
|
16
|
258
|
|
|
|
|
1088
|
my $id = $self->{+ID}; |
17
|
258
|
|
|
|
|
2452
|
my $ids = $hub->ast_ids; |
18
|
|
|
|
|
|
|
|
19
|
258
|
100
|
|
|
|
2652
|
unless (defined $ids->{$id}) { |
20
|
1
|
|
|
|
|
9
|
require Test2::Event::Exception; |
21
|
1
|
|
|
|
|
7
|
my $trace = $self->trace; |
22
|
1
|
|
|
|
|
13
|
$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
|
|
|
|
|
290
|
return; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
257
|
100
|
|
|
|
2571
|
if ($ids->{$id}++) { |
32
|
1
|
|
|
|
|
7
|
require Test2::Event::Exception; |
33
|
1
|
|
|
|
|
4
|
my $trace = $self->trace; |
34
|
1
|
|
|
|
|
10
|
$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__ |