<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package Test2::V0;
use strict;
use warnings;

use Test2::Util::Importer;

our $VERSION = '0.000162';

use Carp qw/croak/;

use Test2::Plugin::SRand();
use Test2::Plugin::UTF8();
use Test2::Tools::Target();

use Test2::Plugin::ExitSummary;

use Test2::API qw/intercept context/;

use Test2::Tools::Event qw/gen_event/;

use Test2::Tools::Defer qw/def do_def/;

use Test2::Tools::Basic qw{
    ok pass fail diag note todo skip
    plan skip_all done_testing bail_out
};

use Test2::Tools::Compare qw{
    is like isnt unlike
    match mismatch validator
    hash array bag object meta meta_check number float rounded within string subset bool check_isa
    number_lt number_le number_ge number_gt
    in_set not_in_set check_set
    item field call call_list call_hash prop check all_items all_keys all_vals all_values
    etc end filter_items
    T F D DF E DNE FDNE U L
    event fail_events
    exact_ref
};

use Test2::Tools::Warnings qw{
    warns warning warnings no_warnings
};

use Test2::Tools::ClassicCompare qw/cmp_ok/;

use Test2::Util::Importer 'Test2::Tools::Subtest' =&gt; (
    subtest_buffered =&gt; { -as =&gt; 'subtest' },
);

use Test2::Tools::Class     qw/can_ok isa_ok DOES_ok/;
use Test2::Tools::Encoding  qw/set_encoding/;
use Test2::Tools::Exports   qw/imported_ok not_imported_ok/;
use Test2::Tools::Ref       qw/ref_ok ref_is ref_is_not/;
use Test2::Tools::Mock      qw/mock mocked/;
use Test2::Tools::Exception qw/try_ok dies lives/;
use Test2::Tools::Refcount  qw/is_refcount is_oneref refcount/;

our @EXPORT = qw{
    ok pass fail diag note todo skip
    plan skip_all done_testing bail_out

    intercept context

    gen_event

    def do_def

    cmp_ok

    warns warning warnings no_warnings

    subtest
    can_ok isa_ok DOES_ok
    set_encoding
    imported_ok not_imported_ok
    ref_ok ref_is ref_is_not
    mock mocked
    dies lives try_ok

    is like isnt unlike
    match mismatch validator
    hash array bag object meta meta_check number float rounded within string subset bool check_isa
    number_lt number_le number_ge number_gt
    in_set not_in_set check_set
    item field call call_list call_hash prop check all_items all_keys all_vals all_values
    etc end filter_items
    T F D DF E DNE FDNE U L
    event fail_events
    exact_ref

    is_refcount is_oneref refcount
};

my $SRAND;
sub import {
    my $class = shift;

    my $caller = caller;
    my (@exports, %options);
    while (my $arg = shift @_) {
        push @exports =&gt; $arg and next unless substr($arg, 0, 1) eq '-';
        $options{$arg} = shift @_;
    }

    # SRand handling
    my $srand    = delete $options{'-srand'};

    my $no_srand = exists $options{'-no_srand'};
    delete $options{'-no_srand'} if $no_srand;

    croak "Cannot combine '-srand' and '-no_srand' options"
        if $no_srand &amp;&amp; defined($srand);

    if ( !$no_srand ) {
        Test2::Plugin::SRand-&gt;import($srand ? $srand : ()) if defined($srand) || !$SRAND++;
    }

    # Pragmas
    my $no_pragmas  = delete $options{'-no_pragmas'};
    my $no_strict   = delete $options{'-no_strict'} || $no_pragmas;
    my $no_warnings = delete $options{'-no_warnings'} || $no_pragmas;
    my $no_utf8     = delete $options{'-no_utf8'} || $no_pragmas;

    strict-&gt;import()              unless $no_strict;
    'warnings'-&gt;import()          unless $no_warnings;
    Test2::Plugin::UTF8-&gt;import() unless $no_utf8;

    my $target = delete $options{'-target'};
    Test2::Tools::Target-&gt;import_into($caller, $target)
        if $target;

    croak "Unknown option(s): " . join(', ', sort keys %options) if keys %options;

    Test2::Util::Importer-&gt;import_into($class, $caller, @exports);
}

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

Test2::V0 - 0Th edition of the Test2 recommended bundle.

=head1 DESCRIPTION

This 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 L&lt;Test2::Suite&gt; itself.

=head1 NAMING, USING, DEPENDING

This bundle should not change in a I&lt;severely&gt; incompatible way. Some minor
breaking changes, specially bugfixes, may be allowed. If breaking changes are
needed then a new C&lt;Test2::V#&gt; module should be released instead.

As new C&lt;V#&gt; modules are released old ones I&lt;may&gt; be moved to different cpan
distributions. You should always use a specific bundle version and list that
version in your distributions testing requirements. You should never simply
list L&lt;Test2::Suite&gt; as your modules dep, instead list the specific bundle, or
tools and plugins you use directly in your metadata.

=head1 SYNOPSIS

    use Test2::V0;

    ok(1, "pass");

    ...

    done_testing;

=head1 RESOLVING CONFLICTS WITH MOOSE

    use Test2::V0 '!meta';

L&lt;Moose&gt; and L&lt;Test2::V0&gt; both export very different C&lt;meta()&gt;
subs. Adding C&lt;'!meta'&gt; to the import args will prevent the sub from being
imported. This bundle also exports the sub under the name C&lt;meta_check()&gt; so
you can use that spelling as an alternative.

=head2 TAGS

=over 4

=item :DEFAULT

The following are both identical:

    use Test2::V0;

    use Test2::V0 ':DEFAULT';

=back

=head2 RENAMING ON IMPORT

    use Test2::V0 ':DEFAULT', '!ok', ok =&gt; {-as =&gt; 'my_ok'};

This bundle uses L&lt;Test2::Util::Importer&gt; for exporting, as such you can use any arguments
it accepts.

Explanation:

=over 4

=item '!ok'

Do not export C&lt;ok()&gt;

=item ok =&gt; {-as =&gt; 'my_ok'}

Actually, go ahead and import C&lt;ok()&gt; but under the name C&lt;my_ok()&gt;.

=back

If you did not add the C&lt;'!ok'&gt; argument then you would have both C&lt;ok()&gt; and
C&lt;my_ok()&gt;

=head1 PRAGMAS

All of these can be disabled via individual import arguments, or by the
C&lt;-no_pragmas&gt; argument.

    use Test2::V0 -no_pragmas =&gt; 1;

=head2 STRICT

L&lt;strict&gt; is turned on for you. You can disable this with the C&lt;-no_strict&gt; or
C&lt;-no_pragmas&gt; import arguments:

    use Test2::V0 -no_strict =&gt; 1;

=head2 WARNINGS

L&lt;warnings&gt; are turned on for you. You can disable this with the
C&lt;-no_warnings&gt; or C&lt;-no_pragmas&gt; import arguments:

    use Test2::V0 -no_warnings =&gt; 1;

=head2 UTF8

This is actually done via the L&lt;Test2::Plugin::UTF8&gt; plugin, see the
L&lt;/PLUGINS&gt; section for details.

B&lt;Note:&gt; C&lt;&lt; -no_pragmas =&gt; 1 &gt;&gt; will turn off the entire plugin.

=head1 PLUGINS

=head2 SRAND

See L&lt;Test2::Plugin::SRand&gt;.

This will set the random seed to today's date. You can provide an alternate seed
with the C&lt;-srand&gt; import option:

    use Test2::V0 -srand =&gt; 1234;

You can also disable this behavior:

    use Test2::V0 -no_srand =&gt; 1;

B&lt;Note&gt; When srand is on (default) it can cause problems with things like
L&lt;File::Temp&gt; which will end up attempting the same "random" filenames for
every test process started on a given day (or sharing the same seed).

=head2 UTF8

See L&lt;Test2::Plugin::UTF8&gt;.

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 C&lt;&lt; -no_utf8 =&gt; 1 &gt;&gt; or C&lt;&lt; -no_pragmas =&gt; 1 &gt;&gt;
import arguments.

    use Test2::V0 -no_utf8 =&gt; 1;

=head2 EXIT SUMMARY

See L&lt;Test2::Plugin::ExitSummary&gt;.

This plugin has no configuration.

=head1 API FUNCTIONS

See L&lt;Test2::API&gt; for these

=over 4

=item $ctx = context()

=item $events = intercept { ... }

=back

=head1 TOOLS

=head2 TARGET

See L&lt;Test2::Tools::Target&gt;.

You can specify a target class with the C&lt;-target&gt; import argument. If you do
not provide a target then C&lt;$CLASS&gt; and C&lt;CLASS()&gt; will not be imported.

    use Test2::V0 -target =&gt; 'My::Class';

    print $CLASS;  # My::Class
    print CLASS(); # My::Class

Or you can specify names:

    use Test2::V0 -target =&gt; { pkg =&gt; 'Some::Package' };

    pkg()-&gt;xxx; # Call 'xxx' on Some::Package
    $pkg-&gt;xxx;  # Same

=over 4

=item $CLASS

Package variable that contains the target class name.

=item $class = CLASS()

Constant function that returns the target class name.

=back

=head2 DEFER

See L&lt;Test2::Tools::Defer&gt;.

=over 4

=item def $func =&gt; @args;

=item do_def()

=back

=head2 BASIC

See L&lt;Test2::Tools::Basic&gt;.

=over 4

=item ok($bool, $name)

=item ok($bool, $name, @diag)

=item pass($name)

=item pass($name, @diag)

=item fail($name)

=item fail($name, @diag)

=item diag($message)

=item note($message)

=item $todo = todo($reason)

=item todo $reason =&gt; sub { ... }

=item skip($reason, $count)

=item plan($count)

=item skip_all($reason)

=item done_testing()

=item bail_out($reason)

=back

=head2 COMPARE

See L&lt;Test2::Tools::Compare&gt;.

=over 4

=item is($got, $want, $name)

=item isnt($got, $do_not_want, $name)

=item like($got, qr/match/, $name)

=item unlike($got, qr/mismatch/, $name)

=item $check = match(qr/pattern/)

=item $check = mismatch(qr/pattern/)

=item $check = validator(sub { return $bool })

=item $check = hash { ... }

=item $check = array { ... }

=item $check = bag { ... }

=item $check = object { ... }

=item $check = meta { ... }

=item $check = number($num)

=item $check = string($str)

=item $check = bool($bool)

=item $check = check_isa($class_name)

=item $check = in_set(@things)

=item $check = not_in_set(@things)

=item $check = check_set(@things)

=item $check = item($thing)

=item $check = item($idx =&gt; $thing)

=item $check = field($name =&gt; $val)

=item $check = call($method =&gt; $expect)

=item $check = call_list($method =&gt; $expect)

=item $check = call_hash($method =&gt; $expect)

=item $check = prop($name =&gt; $expect)

=item $check = check($thing)

=item $check = T()

=item $check = F()

=item $check = D()

=item $check = DF()

=item $check = E()

=item $check = DNE()

=item $check = FDNE()

=item $check = U()

=item $check = L()

=item $check = exact_ref($ref)

=item end()

=item etc()

=item filter_items { grep { ... } @_ }

=item $check = event $type =&gt; ...

=item @checks = fail_events $type =&gt; ...

=back

=head2 CLASSIC COMPARE

See L&lt;Test2::Tools::ClassicCompare&gt;.

=over 4

=item cmp_ok($got, $op, $want, $name)

=back

=head2 SUBTEST

See L&lt;Test2::Tools::Subtest&gt;.

=over 4

=item subtest $name =&gt; sub { ... };

(Note: This is called C&lt;subtest_buffered()&gt; in the Tools module.)

=back

=head2 CLASS

See L&lt;Test2::Tools::Class&gt;.

=over 4

=item can_ok($thing, @methods)

=item isa_ok($thing, @classes)

=item DOES_ok($thing, @roles)

=back

=head2 ENCODING

See L&lt;Test2::Tools::Encoding&gt;.

=over 4

=item set_encoding($encoding)

=back

=head2 EXPORTS

See L&lt;Test2::Tools::Exports&gt;.

=over 4

=item imported_ok('function', '$scalar', ...)

=item not_imported_ok('function', '$scalar', ...)

=back

=head2 REF

See L&lt;Test2::Tools::Ref&gt;.

=over 4

=item ref_ok($ref, $type)

=item ref_is($got, $want)

=item ref_is_not($got, $do_not_want)

=back

See L&lt;Test2::Tools::Refcount&gt;.

=over 4

=item is_refcount($ref, $count, $description)

=item is_oneref($ref, $description)

=item $count = refcount($ref)

=back

=head2 MOCK

See L&lt;Test2::Tools::Mock&gt;.

=over 4

=item $control = mock ...

=item $bool = mocked($thing)

=back

=head2 EXCEPTION

See L&lt;Test2::Tools::Exception&gt;.

=over 4

=item $exception = dies { ... }

=item $bool = lives { ... }

=item $bool = try_ok { ... }

=back

=head2 WARNINGS

See L&lt;Test2::Tools::Warnings&gt;.

=over 4

=item $count = warns { ... }

=item $warning = warning { ... }

=item $warnings_ref = warnings { ... }

=item $bool = no_warnings { ... }

=back

=head1 SOURCE

The source code repository for Test2-Suite can be found at
F&lt;https://github.com/Test-More/Test2-Suite/&gt;.

=head1 MAINTAINERS

=over 4

=item Chad Granum E&lt;lt&gt;exodist@cpan.orgE&lt;gt&gt;

=back

=head1 AUTHORS

=over 4

=item Chad Granum E&lt;lt&gt;exodist@cpan.orgE&lt;gt&gt;

=back

=head1 COPYRIGHT

Copyright 2018 Chad Granum E&lt;lt&gt;exodist@cpan.orgE&lt;gt&gt;.

This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.

See F&lt;http://dev.perl.org/licenses/&gt;

=cut
</pre></body></html>