line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Event::Diag; |
2
|
246
|
|
|
246
|
|
2160
|
use strict; |
|
246
|
|
|
|
|
531
|
|
|
246
|
|
|
|
|
7562
|
|
3
|
246
|
|
|
246
|
|
1287
|
use warnings; |
|
246
|
|
|
|
|
472
|
|
|
246
|
|
|
|
|
14478
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.302182'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
246
|
|
|
246
|
|
1490
|
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } |
|
246
|
|
|
|
|
10565
|
|
9
|
246
|
|
|
246
|
|
1713
|
use Test2::Util::HashBase qw/message/; |
|
246
|
|
|
|
|
583
|
|
|
246
|
|
|
|
|
1851
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub init { |
12
|
1223
|
100
|
|
1223
|
0
|
3467
|
$_[0]->{+MESSAGE} = 'undef' unless defined $_[0]->{+MESSAGE}; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
2
|
1
|
15
|
sub summary { $_[0]->{+MESSAGE} } |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
1
|
5
|
sub diagnostics { 1 } |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub facet_data { |
20
|
1934
|
|
|
1934
|
1
|
2866
|
my $self = shift; |
21
|
|
|
|
|
|
|
|
22
|
1934
|
|
|
|
|
4560
|
my $out = $self->common_facet_data; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$out->{info} = [ |
25
|
|
|
|
|
|
|
{ |
26
|
|
|
|
|
|
|
tag => 'DIAG', |
27
|
|
|
|
|
|
|
debug => 1, |
28
|
1934
|
|
|
|
|
6594
|
details => $self->{+MESSAGE}, |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
]; |
31
|
|
|
|
|
|
|
|
32
|
1934
|
|
|
|
|
4871
|
return $out; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=pod |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=encoding UTF-8 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Test2::Event::Diag - Diag event type |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 DESCRIPTION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Diagnostics messages, typically rendered to STDERR. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 SYNOPSIS |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
use Test2::API qw/context/; |
54
|
|
|
|
|
|
|
use Test2::Event::Diag; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
my $ctx = context(); |
57
|
|
|
|
|
|
|
my $event = $ctx->diag($message); |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 ACCESSORS |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=over 4 |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=item $diag->message |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
The message for the diag. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=back |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SOURCE |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
The source code repository for Test2 can be found at |
72
|
|
|
|
|
|
|
F<http://github.com/Test-More/test-more/>. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 MAINTAINERS |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=over 4 |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item Chad Granum E<lt>exodist@cpan.orgE<gt> |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=back |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 AUTHORS |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=over 4 |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=item Chad Granum E<lt>exodist@cpan.orgE<gt> |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=back |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 COPYRIGHT |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Copyright 2020 Chad Granum E<lt>exodist@cpan.orgE<gt>. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or |
95
|
|
|
|
|
|
|
modify it under the same terms as Perl itself. |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
See F<http://dev.perl.org/licenses/> |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=cut |