Test2::API::Instance - Object used by Test2::API under the hood
This object encapsulates the global shared state tracked by Test2. A single global instance of this package is stored (and obscured) by the Test2::API package.
There is no reason to directly use this package. This package is documented for completeness. This package can change, or go away completely at any time. Directly using, or monkeypatching this package is not supported in any way shape or form.
use Test2::API::Instance;
my $obj = Test2::API::Instance->new;
PID of this instance.
Thread ID of this instance.
Reset the object to defaults.
Set the internal state to loaded, and run and stored post-load callbacks.
Check if the state is set to loaded.
Get the post-load callbacks.
Add a post-load callback. If load()
has already been called then the callback will be immediately executed. If load()
has not been called then the callback will be stored and executed later when load()
is called.
Get a hashref of all active contexts keyed by hub id.
Get all context acquire callbacks.