File Coverage

blib/lib/Test2/EventFacet/Control.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 15 15 100.0


line stmt bran cond sub pod time code
1             package Test2::EventFacet::Control;
2 246     246   1696 use strict;
  246         492  
  246         7050  
3 246     246   1214 use warnings;
  246         479  
  246         14024  
4              
5             our $VERSION = '1.302182';
6              
7 246     246   1469 BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
  246         11120  
8 246     246   1704 use Test2::Util::HashBase qw{ -global -terminate -halt -has_callback -encoding -phase };
  246         600  
  246         1828  
9              
10             1;
11              
12             __END__
13              
14             =pod
15              
16             =encoding UTF-8
17              
18             =head1 NAME
19              
20             Test2::EventFacet::Control - Facet for hub actions and behaviors.
21              
22             =head1 DESCRIPTION
23              
24             This facet is used when the event needs to give instructions to the Test2
25             internals.
26              
27             =head1 FIELDS
28              
29             =over 4
30              
31             =item $string = $control->{details}
32              
33             =item $string = $control->details()
34              
35             Human readable explanation for the special behavior.
36              
37             =item $bool = $control->{global}
38              
39             =item $bool = $control->global()
40              
41             True 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              
47             Defined if the test should immediately exit, the value is the exit code and may
48             be C<0>.
49              
50             =item $bool = $control->{halt}
51              
52             =item $bool = $control->halt()
53              
54             True if all testing should be halted immediately.
55              
56             =item $bool = $control->{has_callback}
57              
58             =item $bool = $control->has_callback()
59              
60             True 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              
66             This can be used to change the encoding from this event onward.
67              
68             =item $phase = $control->{phase}
69              
70             =item $phase = $control->phase()
71              
72             Used to signal that a phase change has occurred. Currently only the perl END
73             phase is signaled.
74              
75             =back
76              
77             =head1 SOURCE
78              
79             The source code repository for Test2 can be found at
80             F<http://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              
100             Copyright 2020 Chad Granum E<lt>exodist@cpan.orgE<gt>.
101              
102             This program is free software; you can redistribute it and/or
103             modify it under the same terms as Perl itself.
104              
105             See F<http://dev.perl.org/licenses/>
106              
107             =cut