You are viewing the version of this documentation from Perl 5.38.1. View the latest version

CONTENTS

NAME

Test2::API::Stack - Object to manage a stack of Test2::Hub instances.

***INTERNALS NOTE***

The internals of this package are subject to change at any time! The public methods provided will not change in backwards incompatible ways, but the underlying implementation details might. Do not break encapsulation here!

DESCRIPTION

This module is used to represent and manage a stack of Test2::Hub objects. Hubs are usually in a stack so that you can push a new hub into place that can intercept and handle events differently than the primary hub.

SYNOPSIS

my $stack = Test2::API::Stack->new;
my $hub = $stack->top;

METHODS

$stack = Test2::API::Stack->new()

This will create a new empty stack instance. All arguments are ignored.

$hub = $stack->new_hub()
$hub = $stack->new_hub(%params)