Test2::Handle - Base class for Test2 handles used in V# bundles.
This is what you interact with when you use the T2() function in a test that uses Test2::V1.
use Test2::V1;
my $handle = T2();
$handle->ok(1, "Passing Test");
use Test2::Handle();
my $handle = Test2::Handle->new(base => 'Test2::V1::Base');
$handle->ok(1, "Passing test");
Most methods are delegated to the base class provided at construction. There are however a few methods that are defined by this package itself.
Get the default handle base. This throws an exception on the base handle class, you should override it in a subclass.
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.
Get the namespace used to store function we wrap as methods.
Get a list of all subs available in the handle namespace.
Import the specified subs from the specified package into our internal namespace.
Used to create a T2() sub in your namsepace at import.
Internally used to intialize and validate the handle object.
Internally used to wrap functions as methods.
The source code repository for Test2-Suite can be found at https://github.com/Test-More/test-more/.
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/