Test2::Handle(3)

NAME
Test2::Handle - Base class for Test2 handles used in V# bundles.

DESCRIPTION
This is what you interact with when you use the T2() function in a test that uses Test2::V1.

SYNOPSIS

  RECOMMENDED
    use Test2::V1;

    my $handle = T2();

    $handle->ok(1, "Passing Test");

  WITHOUT SUGAR
    use Test2::Handle();

    my $handle = Test2::Handle->new(base => 'Test2::V1::Base');

    $handle->ok(1, "Passing test");

METHODS
Most methods are delegated to the base class provided at construction. There are however a few methods that are defined by this package itself.

$base = $class_or_inst->DEFAULT_HANDLE_BASE
    Get the default handle base. This throws an exception on the base handle class, you should override it in a subclass.

$base = $inst->HANDLE_BASE
    In this base class this method always throws an exception. In a subclass it should return the default base class to use for that subclass.

$namespace = $inst->HANDLE_NAMESPACE
    Get the namespace used to store function we wrap as methods.

@sub_names = $inst->HANDLE_SUBS
    Get a list of all subs available in the handle namespace.

$inst->HANDLE_INCLUDE($package, @subs)
    Import the specified subs from the specified package into our internal namespace.

$inst = $class->import()
    Used to create a T2() sub in your namsepace at import.

$inst->init()
    Internally used to intialize and validate the handle object.

AUTOLOAD
    Internally used to wrap functions as methods.

SOURCE
The source code repository for Test2-Suite can be found at https://github.com/Test-More/test-more/.

MAINTAINERS

Chad Granum <exodist@cpan.org>

AUTHORS

Chad Granum <exodist@cpan.org>

COPYRIGHT
Copyright 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/

POD ERRORS
Hey! The above document had some coding errors, which are explained below:

Around line 193:
    This document probably does not appear as it should, because its "=encoding UTF-8" line calls for an unsupported encoding. [Encode.pm v?'s supported encodings are: ]

    Couldn't do =encoding UTF-8: This document probably does not appear as it should, because its "=encoding UTF-8" line calls for an unsupported encoding. [Encode.pm v?'s supported encodings are: ]