1Test2::Tools::Target(3)User Contributed Perl DocumentatioTnest2::Tools::Target(3)
2
3
4
6 Test2::Tools::Target - Alias the testing target package.
7
9 This lets you alias the package you are testing into a constant and a
10 package variable.
11
13 use Test2::Tools::Target 'Some::Package';
14
15 CLASS()->xxx; # Call 'xxx' on Some::Package
16 $CLASS->xxx; # Same
17
18 Or you can specify names:
19
20 use Test2::Tools::Target pkg => 'Some::Package';
21
22 pkg()->xxx; # Call 'xxx' on Some::Package
23 $pkg->xxx; # Same
24
26 The source code repository for Test2-Suite can be found at
27 https://github.com/Test-More/Test2-Suite/.
28
30 Chad Granum <exodist@cpan.org>
31
33 Chad Granum <exodist@cpan.org>
34
36 Copyright 2018 Chad Granum <exodist@cpan.org>.
37
38 This program is free software; you can redistribute it and/or modify it
39 under the same terms as Perl itself.
40
41 See http://dev.perl.org/licenses/
42
43
44
45perl v5.34.0 2021-11-16 Test2::Tools::Target(3)