1Test2::EventFacet::InfoU(s3e)r Contributed Perl DocumentaTteisotn2::EventFacet::Info(3)
2
3
4
6 Test2::EventFacet::Info - Facet for information a developer might care
7 about.
8
10 This facet represents messages intended for humans that will help them
11 either understand a result, or diagnose a failure.
12
14 This facet appears in a list instead of being a single item.
15
17 $string_or_structure = $info->{details}
18 $string_or_structure = $info->details()
19 Human readable string or data structure, this is the information to
20 display. Formatters are free to render the structures however they
21 please. This may contain a blessed object.
22
23 If the "table" attribute (see below) is set then a renderer may
24 choose to display the table instead of the details.
25
26 $structure = $info->{table}
27 $structure = $info->table()
28 If the data the "info" facet needs to convey can be represented as
29 a table then the data may be placed in this attribute in a more raw
30 form for better display. The data must also be represented in the
31 "details" attribute for renderers which do not support rendering
32 tables directly.
33
34 The table structure:
35
36 my %table = {
37 header => [ 'column 1 header', 'column 2 header', ... ], # Optional
38
39 rows => [
40 ['row 1 column 1', 'row 1, column 2', ... ],
41 ['row 2 column 1', 'row 2, column 2', ... ],
42 ...
43 ],
44
45 # Allow the renderer to hide empty columns when true, Optional
46 collapse => $BOOL,
47
48 # List by name or number columns that should never be collapsed
49 no_collapse => \@LIST,
50 }
51
52 $short_string = $info->{tag}
53 $short_string = $info->tag()
54 Short tag to categorize the info. This is usually 10 characters or
55 less, formatters may truncate longer tags.
56
57 $bool = $info->{debug}
58 $bool = $info->debug()
59 Set this to true if the message is critical, or explains a failure.
60 This is info that should be displayed by formatters even in less-
61 verbose modes.
62
63 When false the information is not considered critical and may not
64 be rendered in less-verbose modes.
65
66 $bool = $info->{important}
67 $bool = $info->important
68 This should be set for non debug messages that are still important
69 enough to show when a formatter is in quiet mode. A formatter
70 should send these to STDOUT not STDERR, but should show them even
71 in non-verbose mode.
72
74 The source code repository for Test2 can be found at
75 http://github.com/Test-More/test-more/.
76
78 Chad Granum <exodist@cpan.org>
79
81 Chad Granum <exodist@cpan.org>
82
84 Copyright 2020 Chad Granum <exodist@cpan.org>.
85
86 This program is free software; you can redistribute it and/or modify it
87 under the same terms as Perl itself.
88
89 See http://dev.perl.org/licenses/
90
91
92
93perl v5.32.0 2020-10-15 Test2::EventFacet::Info(3)