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