xref: /openbsd-src/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test2/EventFacet/Control.pm (revision 5486feefcc8cb79b19e014ab332cc5dfd05b3b33)
1package Test2::EventFacet::Control;
2use strict;
3use warnings;
4
5our $VERSION = '1.302199';
6
7BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
8use Test2::Util::HashBase qw{ -global -terminate -halt -has_callback -encoding -phase };
9
101;
11
12__END__
13
14=pod
15
16=encoding UTF-8
17
18=head1 NAME
19
20Test2::EventFacet::Control - Facet for hub actions and behaviors.
21
22=head1 DESCRIPTION
23
24This facet is used when the event needs to give instructions to the Test2
25internals.
26
27=head1 FIELDS
28
29=over 4
30
31=item $string = $control->{details}
32
33=item $string = $control->details()
34
35Human readable explanation for the special behavior.
36
37=item $bool = $control->{global}
38
39=item $bool = $control->global()
40
41True if the event is global in nature and should be seen by all hubs.
42
43=item $exit = $control->{terminate}
44
45=item $exit = $control->terminate()
46
47Defined if the test should immediately exit, the value is the exit code and may
48be C<0>.
49
50=item $bool = $control->{halt}
51
52=item $bool = $control->halt()
53
54True if all testing should be halted immediately.
55
56=item $bool = $control->{has_callback}
57
58=item $bool = $control->has_callback()
59
60True if the C<callback($hub)> method on the event should be called.
61
62=item $encoding = $control->{encoding}
63
64=item $encoding = $control->encoding()
65
66This can be used to change the encoding from this event onward.
67
68=item $phase = $control->{phase}
69
70=item $phase = $control->phase()
71
72Used to signal that a phase change has occurred. Currently only the perl END
73phase is signaled.
74
75=back
76
77=head1 SOURCE
78
79The source code repository for Test2 can be found at
80L<https://github.com/Test-More/test-more/>.
81
82=head1 MAINTAINERS
83
84=over 4
85
86=item Chad Granum E<lt>exodist@cpan.orgE<gt>
87
88=back
89
90=head1 AUTHORS
91
92=over 4
93
94=item Chad Granum E<lt>exodist@cpan.orgE<gt>
95
96=back
97
98=head1 COPYRIGHT
99
100Copyright 2020 Chad Granum E<lt>exodist@cpan.orgE<gt>.
101
102This program is free software; you can redistribute it and/or
103modify it under the same terms as Perl itself.
104
105See L<https://dev.perl.org/licenses/>
106
107=cut
108