1Test2::Bundle(3) User Contributed Perl Documentation Test2::Bundle(3)
2
3
4
6 Test2::Bundle - Documentation for bundles.
7
9 Bundles are collections of Tools and Plugins. Bundles should not
10 provide any tools or behaviors of their own, they should simply combine
11 the tools and behaviors of other packages.
12
14 Should my bundle subclass Test2::Bundle?
15 No. Currently this class is empty. Eventually we may want to add
16 behavior, in which case we do not want anyone to already be
17 subclassing it.
18
20 Writing a bundle can be very simple:
21
22 package Test2::Bundle::MyBundle;
23 use strict;
24 use warnings;
25
26 use Test2::Plugin::ExitSummary; # Load a plugin
27
28 use Test2::Tools::Basic qw/ok plan done_testing/;
29
30 # Re-export the tools
31 our @EXPORTS = qw/ok plan done_testing/;
32 use base 'Exporter';
33
34 1;
35
36 If you want to do anything more complex you should look into
37 Import::Into and Symbol::Move.
38
40 The source code repository for Test2-Suite can be found at
41 https://github.com/Test-More/Test2-Suite/.
42
44 Chad Granum <exodist@cpan.org>
45
47 Chad Granum <exodist@cpan.org>
48
50 Copyright 2018 Chad Granum <exodist@cpan.org>.
51
52 This program is free software; you can redistribute it and/or modify it
53 under the same terms as Perl itself.
54
55 See http://dev.perl.org/licenses/
56
57
58
59perl v5.34.0 2022-03-08 Test2::Bundle(3)