line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::EventFacet::Meta; |
2
|
246
|
|
|
246
|
|
1623
|
use strict; |
|
246
|
|
|
|
|
483
|
|
|
246
|
|
|
|
|
8496
|
|
3
|
246
|
|
|
246
|
|
1404
|
use warnings; |
|
246
|
|
|
|
|
560
|
|
|
246
|
|
|
|
|
13576
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.302181'; |
6
|
|
|
|
|
|
|
|
7
|
246
|
|
|
246
|
|
1582
|
BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) } |
|
246
|
|
|
|
|
10654
|
|
8
|
246
|
|
|
246
|
|
1658
|
use vars qw/$AUTOLOAD/; |
|
246
|
|
|
|
|
582
|
|
|
246
|
|
|
|
|
16587
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# replace set_details |
11
|
|
|
|
|
|
|
{ |
12
|
246
|
|
|
246
|
|
1605
|
no warnings 'redefine'; |
|
246
|
|
|
|
|
617
|
|
|
246
|
|
|
|
|
37441
|
|
13
|
1
|
|
|
1
|
0
|
5
|
sub set_details { $_[0]->{'set_details'} } |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub can { |
17
|
8
|
|
|
8
|
0
|
17
|
my $self = shift; |
18
|
8
|
|
|
|
|
21
|
my ($name) = @_; |
19
|
|
|
|
|
|
|
|
20
|
8
|
|
|
|
|
40
|
my $existing = $self->SUPER::can($name); |
21
|
8
|
50
|
|
|
|
31
|
return $existing if $existing; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# Only vivify when called on an instance, do not vivify for a class. There |
24
|
|
|
|
|
|
|
# are a lot of magic class methods used in things like serialization (or |
25
|
|
|
|
|
|
|
# the forks.pm module) which cause problems when vivified. |
26
|
8
|
50
|
|
|
|
21
|
return undef unless ref($self); |
27
|
|
|
|
|
|
|
|
28
|
8
|
|
|
12
|
|
35
|
my $sub = sub { $_[0]->{$name} }; |
|
12
|
|
|
|
|
281
|
|
29
|
|
|
|
|
|
|
{ |
30
|
246
|
|
|
246
|
|
1880
|
no strict 'refs'; |
|
246
|
|
|
|
|
583
|
|
|
246
|
|
|
|
|
38808
|
|
|
8
|
|
|
|
|
13
|
|
31
|
8
|
|
|
|
|
26
|
*$name = $sub; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
8
|
|
|
|
|
22
|
return $sub; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub AUTOLOAD { |
38
|
6
|
|
|
6
|
|
15
|
my $name = $AUTOLOAD; |
39
|
6
|
|
|
|
|
41
|
$name =~ s/^.*:://g; |
40
|
6
|
|
|
|
|
19
|
my $sub = $_[0]->can($name); |
41
|
6
|
|
|
|
|
23
|
goto &$sub; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
1; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=pod |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=encoding UTF-8 |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 NAME |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Test2::EventFacet::Meta - Facet for meta-data |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 DESCRIPTION |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
This facet can contain any random meta-data that has been attached to the |
59
|
|
|
|
|
|
|
event. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 METHODS AND FIELDS |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Any/all fields and accessors are autovivified into existence. There is no way |
64
|
|
|
|
|
|
|
to know what metadata may be added, so any is allowed. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=over 4 |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=item $anything = $meta->{anything} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=item $anything = $meta->anything() |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=back |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 SOURCE |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
The source code repository for Test2 can be found at |
77
|
|
|
|
|
|
|
F<http://github.com/Test-More/test-more/>. |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 MAINTAINERS |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=over 4 |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=item Chad Granum E<lt>exodist@cpan.orgE<gt> |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=back |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=head1 AUTHORS |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=over 4 |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=item Chad Granum E<lt>exodist@cpan.orgE<gt> |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=back |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 COPYRIGHT |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Copyright 2020 Chad Granum E<lt>exodist@cpan.orgE<gt>. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or |
100
|
|
|
|
|
|
|
modify it under the same terms as Perl itself. |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
See F<http://dev.perl.org/licenses/> |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=cut |