line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::EventFacet; |
2
|
246
|
|
|
246
|
|
1564
|
use strict; |
|
246
|
|
|
|
|
447
|
|
|
246
|
|
|
|
|
6935
|
|
3
|
246
|
|
|
246
|
|
1219
|
use warnings; |
|
246
|
|
|
|
|
423
|
|
|
246
|
|
|
|
|
10236
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.302181'; |
6
|
|
|
|
|
|
|
|
7
|
246
|
|
|
246
|
|
110596
|
use Test2::Util::HashBase qw/-details/; |
|
246
|
|
|
|
|
622
|
|
|
246
|
|
|
|
|
1388
|
|
8
|
246
|
|
|
246
|
|
1640
|
use Carp qw/croak/; |
|
246
|
|
|
|
|
562
|
|
|
246
|
|
|
|
|
43743
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
my $SUBLEN = length(__PACKAGE__ . '::'); |
11
|
|
|
|
|
|
|
sub facet_key { |
12
|
360
|
|
33
|
360
|
1
|
1355
|
my $key = ref($_[0]) || $_[0]; |
13
|
360
|
|
|
|
|
772
|
substr($key, 0, $SUBLEN, ''); |
14
|
360
|
|
|
|
|
914
|
return lc($key); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
344
|
|
|
344
|
1
|
993
|
sub is_list { 0 } |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub clone { |
20
|
117
|
|
|
117
|
1
|
196
|
my $self = shift; |
21
|
117
|
|
|
|
|
194
|
my $type = ref($self); |
22
|
117
|
|
|
|
|
617
|
return bless {%$self, @_}, $type; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
__END__ |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=pod |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=encoding UTF-8 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Test2::EventFacet - Base class for all event facets. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 DESCRIPTION |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Base class for all event facets. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 METHODS |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=over 4 |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=item $key = $facet_class->facet_key() |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
This will return the key for the facet in the facet data hash. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=item $bool = $facet_class->is_list() |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
This will return true if the facet should be in a list instead of a single |
52
|
|
|
|
|
|
|
item. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=item $clone = $facet->clone() |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=item $clone = $facet->clone(%replace) |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
This will make a shallow clone of the facet. You may specify fields to override |
59
|
|
|
|
|
|
|
as arguments. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=back |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 SOURCE |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
The source code repository for Test2 can be found at |
66
|
|
|
|
|
|
|
F<http://github.com/Test-More/test-more/>. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 MAINTAINERS |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=over 4 |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item Chad Granum E<lt>exodist@cpan.orgE<gt> |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=back |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 AUTHORS |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=over 4 |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=item Chad Granum E<lt>exodist@cpan.orgE<gt> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=back |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 COPYRIGHT |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Copyright 2020 Chad Granum E<lt>exodist@cpan.orgE<gt>. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or |
89
|
|
|
|
|
|
|
modify it under the same terms as Perl itself. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
See F<http://dev.perl.org/licenses/> |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=cut |