line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OpenTracing::Role::ContextReference; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = 'v0.85.0'; |
4
|
|
|
|
|
|
|
|
5
|
3
|
|
|
3
|
|
447124
|
use Moo::Role; |
|
3
|
|
|
|
|
16778
|
|
|
3
|
|
|
|
|
19
|
|
6
|
3
|
|
|
3
|
|
2568
|
use MooX::Enumeration; |
|
3
|
|
|
|
|
7592
|
|
|
3
|
|
|
|
|
14
|
|
7
|
3
|
|
|
3
|
|
1732
|
use MooX::ProtectedAttributes; |
|
3
|
|
|
|
|
2165
|
|
|
3
|
|
|
|
|
18
|
|
8
|
3
|
|
|
3
|
|
1413
|
use MooX::Should; |
|
3
|
|
|
|
|
15108
|
|
|
3
|
|
|
|
|
20
|
|
9
|
|
|
|
|
|
|
|
10
|
3
|
|
|
3
|
|
1623
|
use OpenTracing::Types qw/SpanContext/; |
|
3
|
|
|
|
|
131165
|
|
|
3
|
|
|
|
|
33
|
|
11
|
3
|
|
|
3
|
|
2485
|
use Types::Standard qw/Enum/; |
|
3
|
|
|
|
|
132987
|
|
|
3
|
|
|
|
|
36
|
|
12
|
|
|
|
|
|
|
|
13
|
3
|
|
|
3
|
|
2597
|
use constant CHILD_OF => 'child_of'; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
216
|
|
14
|
3
|
|
|
3
|
|
18
|
use constant FOLLOWS_FROM => 'follows_from'; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
559
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
protected_has reference_type => ( |
17
|
|
|
|
|
|
|
is => 'ro', |
18
|
|
|
|
|
|
|
should => Enum[ CHILD_OF, FOLLOWS_FROM ], |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
has referenced_context => ( |
22
|
|
|
|
|
|
|
is => 'ro', |
23
|
|
|
|
|
|
|
should => SpanContext, |
24
|
|
|
|
|
|
|
required => 1, |
25
|
|
|
|
|
|
|
reader => 'get_referenced_context', |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub new_child_of { |
29
|
1
|
|
|
1
|
1
|
1528
|
$_[0]->new( |
30
|
|
|
|
|
|
|
reference_type => CHILD_OF, |
31
|
|
|
|
|
|
|
referenced_context => $_[1], |
32
|
|
|
|
|
|
|
) |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
1
|
|
|
1
|
1
|
2763
|
sub type_is_child_of { $_[0]->reference_type eq CHILD_OF } |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub new_follows_from { |
38
|
1
|
|
|
1
|
1
|
3524
|
$_[0]->new( |
39
|
|
|
|
|
|
|
reference_type => FOLLOWS_FROM, |
40
|
|
|
|
|
|
|
referenced_context => $_[1], |
41
|
|
|
|
|
|
|
) |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
1
|
|
|
1
|
1
|
898
|
sub type_is_follows_from { $_[0]->reference_type eq FOLLOWS_FROM } |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
BEGIN { |
49
|
3
|
|
|
3
|
|
22
|
with 'OpenTracing::Interface::ContextReference' |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |