This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
f8a62211aee822376cb9a2086e1f0424bc932dac
[perl5.git] / cpan / Test-Simple / lib / Test2 / Event / Note.pm
1 package Test2::Event::Note;
2 use strict;
3 use warnings;
4
5 our $VERSION = '1.302169';
6
7
8 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
9 use Test2::Util::HashBase qw/message/;
10
11 sub init {
12     $_[0]->{+MESSAGE} = 'undef' unless defined $_[0]->{+MESSAGE};
13 }
14
15 sub summary { $_[0]->{+MESSAGE} }
16
17 sub 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
33 1;
34
35 __END__
36
37 =pod
38
39 =encoding UTF-8
40
41 =head1 NAME
42
43 Test2::Event::Note - Note event type
44
45 =head1 DESCRIPTION
46
47 Notes, 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
63 The message for the note.
64
65 =back
66
67 =head1 SOURCE
68
69 The source code repository for Test2 can be found at
70 F<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
90 Copyright 2019 Chad Granum E<lt>exodist@cpan.orgE<gt>.
91
92 This program is free software; you can redistribute it and/or
93 modify it under the same terms as Perl itself.
94
95 See F<http://dev.perl.org/licenses/>
96
97 =cut