This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
new perldelta
[perl5.git] / cpan / Test-Simple / lib / Test2 / EventFacet / Plan.pm
CommitLineData
07bc328a
SH
1package Test2::EventFacet::Plan;
2use strict;
3use warnings;
4
cf76a266 5our $VERSION = '1.302198';
07bc328a
SH
6
7BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
8use Test2::Util::HashBase qw{ -count -skip -none };
9
101;
11
12__END__
13
14=pod
15
16=encoding UTF-8
17
18=head1 NAME
19
20Test2::EventFacet::Plan - Facet for setting the plan
21
22=head1 DESCRIPTION
23
24Events use this facet when they need to set the plan.
25
26=head1 FIELDS
27
28=over 4
29
30=item $string = $plan->{details}
31
32=item $string = $plan->details()
33
34Human readable explanation for the plan being set. This is normally not
35rendered by most formatters except when the C<skip> field is also set.
36
37=item $positive_int = $plan->{count}
38
39=item $positive_int = $plan->count()
40
41Set the number of expected assertions. This should usually be set to C<0> when
42C<skip> or C<none> are also set.
43
44=item $bool = $plan->{skip}
45
46=item $bool = $plan->skip()
47
48When true the entire test should be skipped. This is usually paired with an
49explanation in the C<details> field, and a C<control> facet that has
50C<terminate> set to C<0>.
51
52=item $bool = $plan->{none}
53
54=item $bool = $plan->none()
55
56This is mainly used by legacy L<Test::Builder> tests which set the plan to C<no
57plan>, a construct that predates the much better C<done_testing()>.
58
59If you are using this in non-legacy code you may need to reconsider the course
60of your life, maybe a hermitage would suite you?
61
62=back
63
64=head1 SOURCE
65
66The source code repository for Test2 can be found at
67F<http://github.com/Test-More/test-more/>.
68
69=head1 MAINTAINERS
70
71=over 4
72
73=item Chad Granum E<lt>exodist@cpan.orgE<gt>
74
75=back
76
77=head1 AUTHORS
78
79=over 4
80
81=item Chad Granum E<lt>exodist@cpan.orgE<gt>
82
83=back
84
85=head1 COPYRIGHT
86
18c72c39 87Copyright 2020 Chad Granum E<lt>exodist@cpan.orgE<gt>.
07bc328a
SH
88
89This program is free software; you can redistribute it and/or
90modify it under the same terms as Perl itself.
91
92See F<http://dev.perl.org/licenses/>
93
94=cut