line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::EventFacet::Meta; |
2
|
246
|
|
|
246
|
|
1675
|
use strict; |
|
246
|
|
|
|
|
508
|
|
|
246
|
|
|
|
|
8490
|
|
3
|
246
|
|
|
246
|
|
1321
|
use warnings; |
|
246
|
|
|
|
|
497
|
|
|
246
|
|
|
|
|
14267
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.302182'; |
6
|
|
|
|
|
|
|
|
7
|
246
|
|
|
246
|
|
1579
|
BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) } |
|
246
|
|
|
|
|
10390
|
|
8
|
246
|
|
|
246
|
|
1689
|
use vars qw/$AUTOLOAD/; |
|
246
|
|
|
|
|
541
|
|
|
246
|
|
|
|
|
16938
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# replace set_details |
11
|
|
|
|
|
|
|
{ |
12
|
246
|
|
|
246
|
|
1649
|
no warnings 'redefine'; |
|
246
|
|
|
|
|
552
|
|
|
246
|
|
|
|
|
38543
|
|
13
|
1
|
|
|
1
|
0
|
6
|
sub set_details { $_[0]->{'set_details'} } |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub can { |
17
|
8
|
|
|
8
|
0
|
18
|
my $self = shift; |
18
|
8
|
|
|
|
|
19
|
my ($name) = @_; |
19
|
|
|
|
|
|
|
|
20
|
8
|
|
|
|
|
60
|
my $existing = $self->SUPER::can($name); |
21
|
8
|
50
|
|
|
|
24
|
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
|
|
34
|
my $sub = sub { $_[0]->{$name} }; |
|
12
|
|
|
|
|
269
|
|
29
|
|
|
|
|
|
|
{ |
30
|
246
|
|
|
246
|
|
1791
|
no strict 'refs'; |
|
246
|
|
|
|
|
622
|
|
|
246
|
|
|
|
|
39857
|
|
|
8
|
|
|
|
|
12
|
|
31
|
8
|
|
|
|
|
27
|
*$name = $sub; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
8
|
|
|
|
|
25
|
return $sub; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub AUTOLOAD { |
38
|
6
|
|
|
6
|
|
17
|
my $name = $AUTOLOAD; |
39
|
6
|
|
|
|
|
40
|
$name =~ s/^.*:://g; |
40
|
6
|
|
|
|
|
21
|
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 |