Commit | Line | Data |
---|---|---|
07bc328a SH |
1 | package Test2::EventFacet::Info; |
2 | use strict; | |
3 | use warnings; | |
4 | ||
f08d6ff9 | 5 | our $VERSION = '1.302101'; |
07bc328a SH |
6 | |
7 | sub is_list { 1 } | |
8 | ||
9 | BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) } | |
10 | use Test2::Util::HashBase qw{-tag -debug -important}; | |
11 | ||
12 | 1; | |
13 | ||
14 | __END__ | |
15 | ||
16 | =pod | |
17 | ||
18 | =encoding UTF-8 | |
19 | ||
20 | =head1 NAME | |
21 | ||
22 | Test2::EventFacet::Info - Facet for information a developer might care about. | |
23 | ||
24 | =head1 DESCRIPTION | |
25 | ||
26 | This facet represents messages intended for humans that will help them either | |
27 | understand a result, or diagnose a failure. | |
28 | ||
29 | =head1 NOTES | |
30 | ||
31 | This facet appears in a list instead of being a single item. | |
32 | ||
33 | =head1 FIELDS | |
34 | ||
35 | =over 4 | |
36 | ||
37 | =item $string_or_structure = $info->{details} | |
38 | ||
39 | =item $string_or_structure = $info->details() | |
40 | ||
41 | Human readable string or data structure, this is the information to display. | |
42 | Formatters are free to render the structures however they please. This may | |
43 | contain a blessed object. | |
44 | ||
45 | =item $short_string = $info->{tag} | |
46 | ||
47 | =item $short_string = $info->tag() | |
48 | ||
49 | Short tag to categorize the info. This is usually 10 characters or less, | |
50 | formatters may truncate longer tags. | |
51 | ||
52 | =item $bool = $info->{debug} | |
53 | ||
54 | =item $bool = $info->debug() | |
55 | ||
56 | Set this to true if the message is critical, or explains a failure. This is | |
57 | info that should be displayed by formatters even in less-verbose modes. | |
58 | ||
59 | When false the information is not considered critical and may not be rendered | |
60 | in less-verbose modes. | |
61 | ||
62 | =item $bool = $info->{important} | |
63 | ||
64 | =item $bool = $info->important | |
65 | ||
66 | This should be set for non debug messages that are still important enough to | |
67 | show when a formatter is in quiet mode. A formatter should send these to STDOUT | |
68 | not STDERR, but should show them even in non-verbose mode. | |
69 | ||
70 | =back | |
71 | ||
72 | =head1 SOURCE | |
73 | ||
74 | The source code repository for Test2 can be found at | |
75 | F<http://github.com/Test-More/test-more/>. | |
76 | ||
77 | =head1 MAINTAINERS | |
78 | ||
79 | =over 4 | |
80 | ||
81 | =item Chad Granum E<lt>exodist@cpan.orgE<gt> | |
82 | ||
83 | =back | |
84 | ||
85 | =head1 AUTHORS | |
86 | ||
87 | =over 4 | |
88 | ||
89 | =item Chad Granum E<lt>exodist@cpan.orgE<gt> | |
90 | ||
91 | =back | |
92 | ||
93 | =head1 COPYRIGHT | |
94 | ||
95 | Copyright 2016 Chad Granum E<lt>exodist@cpan.orgE<gt>. | |
96 | ||
97 | This program is free software; you can redistribute it and/or | |
98 | modify it under the same terms as Perl itself. | |
99 | ||
100 | See F<http://dev.perl.org/licenses/> | |
101 | ||
102 | =cut |