|
NAMETest2::Bundle::Extended - Old name for Test2::V0*** DEPRECATED ***This bundle has been renamed to Test2::V0, in which the ':v1' tag has been removed as unnecessary.DESCRIPTIONThis is the big-daddy bundle. This bundle includes nearly every tool, and several plugins, that the Test2 author uses. This bundle is used extensively to test Test2::Suite itself.SYNOPSISuse Test2::Bundle::Extended ':v1'; ok(1, "pass"); ... done_testing; RESOLVING CONFLICTS WITH MOOSEuse Test2::Bundle::Extended '!meta'; Moose and Test2::Bundle::Extended both export very different "meta()" subs. Adding '!meta' to the import args will prevent the sub from being imported. This bundle also exports the sub under the name "meta_check()" so you can use that spelling as an alternative. TAGS
RENAMING ON IMPORTuse Test2::Bundle::Extended ':v1', '!ok', ok => {-as => 'my_ok'}; This bundle uses Importer for exporting, as such you can use any arguments it accepts. Explanation:
If you did not add the '!ok' argument then you would have both "ok()" and "my_ok()" PRAGMASAll of these can be disabled via individual import arguments, or by the "-no_pragmas" argument.use Test2::Bundle::Extended -no_pragmas => 1; STRICTstrict is turned on for you. You can disable this with the "-no_strict" or "-no_pragmas" import arguments:use Test2::Bundle::Extended -no_strict => 1; WARNINGSwarnings are turned on for you. You can disable this with the "-no_warnings" or "-no_pragmas" import arguments:use Test2::Bundle::Extended -no_warnings => 1; UTF8This is actually done via the Test2::Plugin::UTF8 plugin, see the "PLUGINS" section for details.Note: "-no_pragmas => 1" will turn off the entire plugin. PLUGINSSRANDSee Test2::Plugin::SRand.This will set the random seed to today's date. You can provide an alternate seed with the "-srand" import option: use Test2::Bundle::Extended -srand => 1234; UTF8See Test2::Plugin::UTF8.This will set the file, and all output handles (including formatter handles), to utf8. This will turn on the utf8 pragma for the current scope. This can be disabled using the "-no_utf8 => 1" or "-no_pragmas => 1" import arguments. use Test2::Bundle::Extended -no_utf8 => 1; EXIT SUMMARYSee Test2::Plugin::ExitSummary.This plugin has no configuration. API FUNCTIONSSee Test2::API for these
TOOLSTARGETSee Test2::Tools::Target.You can specify a target class with the "-target" import argument. If you do not provide a target then $CLASS and "CLASS()" will not be imported. use Test2::Bundle::Extended -target => 'My::Class'; print $CLASS; # My::Class print CLASS(); # My::Class Or you can specify names: use Test2::Bundle::Extended -target => { pkg => 'Some::Package' }; pkg()->xxx; # Call 'xxx' on Some::Package $pkg->xxx; # Same
DEFERSee Test2::Tools::Defer.
BASICSee Test2::Tools::Basic.
COMPARESee Test2::Tools::Compare.
CLASSIC COMPARESee Test2::Tools::ClassicCompare.
SUBTESTSee Test2::Tools::Subtest.
CLASSSee Test2::Tools::Class.
ENCODINGSee Test2::Tools::Encoding.
EXPORTSSee Test2::Tools::Exports.
REFSee Test2::Tools::Ref.
MOCKSee Test2::Tools::Mock.
EXCEPTIONSee Test2::Tools::Exception.
WARNINGSSee Test2::Tools::Warnings.
SOURCEThe source code repository for Test2-Suite can be found at https://github.com/Test-More/Test2-Suite/.MAINTAINERS
AUTHORS
COPYRIGHTCopyright 2018 Chad Granum <exodist@cpan.org>.This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/
Visit the GSP FreeBSD Man Page Interface. |