1Test2::Plugin(3)      User Contributed Perl Documentation     Test2::Plugin(3)
2
3
4

NAME

6       Test2::Plugin - Documentation for plugins
7

DESCRIPTION

9       Plugins are packages that cause behavior changes, or other side effects
10       for the test file that loads them. They should not export any
11       functions, or provide any tools. Plugins should be distinct units of
12       functionality.
13
14       If you wish to combine behavior changes with tools then you should
15       write a Plugin, a Tools module, and a bundle that loads them both.
16

FAQ

18       Should I subclass Test2::Plugin?
19           No. Currently this class is empty. Eventually we may want to add
20           behavior, in which case we do not want anyone to already be
21           subclassing it.
22

HOW DO I WRITE A PLUGIN?

24       Writing a plugin is not as simple as writing an Test2::Bundle, or
25       writing Test2::Tools. Plugins alter behavior, or cause desirable side-
26       effects. To accomplish this you typically need a custom "import()"
27       method that calls one or more functions provided by the Test2::API
28       package.
29
30       If you want to write a plugin you should look at existing plugins, as
31       well as the Test2::API and Test2::Hub documentation. There is no
32       formula for a Plugin, they are generally unique, however consistent
33       rules are that they should not load other plugins, or export any
34       functions.
35

SOURCE

37       The source code repository for Test2-Suite can be found at
38       https://github.com/Test-More/Test2-Suite/.
39

MAINTAINERS

41       Chad Granum <exodist@cpan.org>
42

AUTHORS

44       Chad Granum <exodist@cpan.org>
45
47       Copyright 2018 Chad Granum <exodist@cpan.org>.
48
49       This program is free software; you can redistribute it and/or modify it
50       under the same terms as Perl itself.
51
52       See http://dev.perl.org/licenses/
53
54
55
56perl v5.32.0                      2020-12-16                  Test2::Plugin(3)
Impressum