{
    "content": [
        {
            "type": "text",
            "text": "# Test2::Event::Generic (perldoc)\n\n## NAME\n\nTest2::Event::Generic - Generic event type.\n\n## SYNOPSIS\n\nuse Test2::API qw/context/;\nsub sendcustomfail {\nmy $ctx = shift;\n$ctx->sendevent('Generic', causesfail => 1, summary => 'The sky is falling');\n$ctx->release;\n}\nsendcustomfail();\n\n## DESCRIPTION\n\nThis is a generic event that lets you customize all fields in the event API. This is useful if\nyou have need for a custom event that does not make sense as a published reusable event\nsubclass.\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::Event::Generic",
        "section": "",
        "mode": "perldoc",
        "summary": "Test2::Event::Generic - Generic event type.",
        "synopsis": "use Test2::API qw/context/;\nsub sendcustomfail {\nmy $ctx = shift;\n$ctx->sendevent('Generic', causesfail => 1, summary => 'The sky is falling');\n$ctx->release;\n}\nsendcustomfail();",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 55,
                "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::Event::Generic - Generic event type.\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This is a generic event that lets you customize all fields in the event API. This is useful if\nyou have need for a custom event that does not make sense as a published reusable event\nsubclass.\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Test2::API qw/context/;\n\nsub sendcustomfail {\nmy $ctx = shift;\n\n$ctx->sendevent('Generic', causesfail => 1, summary => 'The sky is falling');\n\n$ctx->release;\n}\n\nsendcustomfail();\n",
                "subsections": []
            },
            "METHODS": {
                "content": "$e->facetdata($data)\n$data = $e->facetdata\nGet or set the facet data (see Test2::Event). If no facetdata is set then\n\"Test2::Event->facetdata\" will be called to produce facets from the other data.\n\n$e->callback($hub)\nCall the custom callback if one is set, otherwise this does nothing.\n\n$e->setcallback(sub { ... })\nSet the custom callback. The custom callback must be a coderef. The first argument to your\ncallback will be the event itself, the second will be the Test2::Event::Hub that is using\nthe callback.\n\n$bool = $e->causesfail\n$e->setcausesfail($bool)\nGet/Set the \"causesfail\" attribute. This defaults to 0.\n\n$bool = $e->diagnostics\n$e->setdiagnostics($bool)\nGet/Set the \"diagnostics\" attribute. This defaults to 0.\n\n$boolorundef = $e->global\n@boolorempty = $e->global\n$e->setglobal($boolorundef)\nGet/Set the \"diagnostics\" attribute. This defaults to an empty list which is undef in scalar\ncontext.\n\n$bool = $e->incrementscount\n$e->setincrementscount($bool)\nGet/Set the \"incrementscount\" attribute. This defaults to 0.\n\n$bool = $e->nodisplay\n$e->setnodisplay($bool)\nGet/Set the \"nodisplay\" attribute. This defaults to 0.\n\n@plan = $e->setsplan\nGet the plan if this event sets one. The plan is a list of up to 3 items: \"($count,\n$directive, $reason)\". $count must be defined, the others may be undef, or may not exist at\nall.\n\n$e->setsetsplan(\\@plan)\nSet the plan. You must pass in an arrayref with up to 3 elements.\n\n$summary = $e->summary\n$e->setsummary($summaryorundef)\nGet/Set the summary. This will default to the event package 'Test2::Event::Generic'. You can\nset it to any value. Setting this to \"undef\" will reset it to the default.\n\n$intorundef = $e->terminate\n@intorempty = $e->terminate\n$e->setterminate($intorundef)\nThis will get/set the \"terminate\" attribute. This defaults to undef in scalar context, or an\nempty list in list context. Setting this to undef will clear it completely. This must be set\nto a positive integer (0 or larger).\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": []
            }
        }
    }
}