{
    "content": [
        {
            "type": "text",
            "text": "# Test2::API::Stack (perldoc)\n\n## NAME\n\nTest2::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!\n\n## SYNOPSIS\n\nmy $stack = Test2::API::Stack->new;\nmy $hub = $stack->top;\n\n## DESCRIPTION\n\nThis module is used to represent and manage a stack of Test2::Hub objects. Hubs are usually in a\nstack so that you can push a new hub into place that can intercept and handle events differently\nthan the primary hub.\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION**\n- **SYNOPSIS**\n- **METHODS**\n- **SOURCE**\n- **MAINTAINERS**\n- **AUTHORS**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Test2::API::Stack",
        "section": "",
        "mode": "perldoc",
        "summary": "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!",
        "synopsis": "my $stack = Test2::API::Stack->new;\nmy $hub = $stack->top;",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 43,
                "subsections": []
            },
            {
                "name": "SOURCE",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "MAINTAINERS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Test2::API::Stack - Object to manage a stack of Test2::Hub instances.\n\n*INTERNALS NOTE*\nThe internals of this package are subject to change at any time! The public methods provided\nwill not change in backwards incompatible ways, but the underlying implementation details might.\nDo not break encapsulation here!\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This module is used to represent and manage a stack of Test2::Hub objects. Hubs are usually in a\nstack so that you can push a new hub into place that can intercept and handle events differently\nthan the primary hub.\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "my $stack = Test2::API::Stack->new;\nmy $hub = $stack->top;\n",
                "subsections": []
            },
            "METHODS": {
                "content": "$stack = Test2::API::Stack->new()\nThis will create a new empty stack instance. All arguments are ignored.\n\n$hub = $stack->newhub()\n$hub = $stack->newhub(%params)\n$hub = $stack->newhub(%params, class => $class)\nThis will generate a new hub and push it to the top of the stack. Optionally you can provide\narguments that will be passed into the constructor for the Test2::Hub object.\n\nIf you specify the \"'class' => $class\" argument, the new hub will be an instance of the\nspecified class.\n\nUnless your parameters specify 'formatter' or 'ipc' arguments, the formatter and IPC\ninstance will be inherited from the current top hub. You can set the parameters to \"undef\"\nto avoid having a formatter or IPC instance.\n\nIf there is no top hub, and you do not ask to leave IPC and formatter undef, then a new\nformatter will be created, and the IPC instance from Test2::API will be used.\n\n$hub = $stack->top()\nThis will return the top hub from the stack. If there is no top hub yet this will create it.\n\n$hub = $stack->peek()\nThis will return the top hub from the stack. If there is no top hub yet this will return\nundef.\n\n$stack->cull\nThis will call \"$hub->cull\" on all hubs in the stack.\n\n@hubs = $stack->all\nThis will return all the hubs in the stack as a list.\n\n$stack->clear\nThis will completely remove all hubs from the stack. Normally you do not want to do this,\nbut there are a few valid reasons for it.\n\n$stack->push($hub)\nThis will push the new hub onto the stack.\n\n$stack->pop($hub)\nThis will pop a hub from the stack, if the hub at the top of the stack does not match the\nhub you expect (passed in as an argument) it will throw an exception.\n",
                "subsections": []
            },
            "SOURCE": {
                "content": "The source code repository for Test2 can be found at http://github.com/Test-More/test-more/.\n",
                "subsections": []
            },
            "MAINTAINERS": {
                "content": "Chad Granum <exodist@cpan.org>\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "Chad Granum <exodist@cpan.org>\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright 2020 Chad Granum <exodist@cpan.org>.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n\nSee http://dev.perl.org/licenses/\n",
                "subsections": []
            }
        }
    }
}