{
    "content": [
        {
            "type": "text",
            "text": "# B::Hooks::EndOfScope (info)\n\n## NAME\n\nB::Hooks::EndOfScope - Execute code after a scope finished compilation\n\n## SYNOPSIS\n\nonscopeend { ... };\n\n## DESCRIPTION\n\nThis module allows you to execute code when perl finished compiling the\nsurrounding scope.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **FUNCTIONS**\n- **LIMITATIONS**\n- **SEE ALSO**\n- **SUPPORT**\n- **AUTHORS**\n- **CONTRIBUTORS**\n- **COPYRIGHT AND LICENCE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "B::Hooks::EndOfScope",
        "section": "",
        "mode": "info",
        "summary": "B::Hooks::EndOfScope - Execute code after a scope finished compilation",
        "synopsis": "onscopeend { ... };",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "LIMITATIONS",
                "lines": 46,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SUPPORT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "CONTRIBUTORS",
                "lines": 12,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENCE",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "B::Hooks::EndOfScope - Execute code after a scope finished compilation\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version 0.25\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "onscopeend { ... };\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This module allows you to execute code when perl finished compiling the\nsurrounding scope.\n",
                "subsections": []
            },
            "FUNCTIONS": {
                "content": "onscopeend\nonscopeend { ... };\n\nonscopeend $code;\n\nRegisters $code to be executed after the surrounding scope has been\ncompiled.\n\nThis is exported by default. See Sub::Exporter on how to customize it.\n",
                "subsections": []
            },
            "LIMITATIONS": {
                "content": "Pure-perl mode caveat\nThis caveat applies to any version of perl where Variable::Magic is\nunavailable or otherwise disabled.\n\nWhile Variable::Magic has access to some very dark sorcery to make it\npossible to throw an exception from within a callback, the pure-perl\nimplementation does not have access to these hacks. Therefore, what\nwould have been a compile-time exception is instead converted to a\nwarning, and your execution will continue as if the exception never\nhappened.\n\nTo explicitly request an XS (or PP) implementation one has two choices.\nEither to import from the desired implementation explicitly:\n\nuse B::Hooks::EndOfScope::XS\nor\nuse B::Hooks::EndOfScope::PP\n\nor by setting $ENV{BHOOKSENDOFSCOPEIMPLEMENTATION} to either \"XS\" or\n\"PP\".\n\nPerl 5.8.0 ~ 5.8.3\nDue to a core interpreter bug\n<https://rt.perl.org/Public/Bug/Display.html?id=27040#txn-82797>\npresent in older perl versions, the implementation of\nB::Hooks::EndOfScope deliberately leaks a single empty hash for every\nscope being cleaned. This is done to avoid the memory corruption\nassociated with the bug mentioned above.\n\nIn order to stabilize this workaround use of Variable::Magic is\ndisabled on perls prior to version 5.8.4. On such systems\nloading/requesting B::Hooks::EndOfScope::XS explicitly will result in a\ncompile-time exception.\n\nPerl versions 5.6.x\nVersions of perl before 5.8.0 lack a feature allowing changing the\nvisibility of \"%^H\" via setting bit 17 within $^H. As such the only way\nto achieve the effect necessary for this module to work, is to use the\n\"local\" operator explicitly on these platforms. This might lead to\nunexpected interference with other scope-driven libraries relying on\nthe same mechanism. On the flip side there are no such known\nincompatibilities at the time this note was written.\n\nFor further details on the unavailable behavior please refer to the\ntest file t/02-localise.t included with the distribution.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "Sub::Exporter\n\nVariable::Magic\n",
                "subsections": []
            },
            "SUPPORT": {
                "content": "Bugs may be submitted through the RT bug tracker\n<https://rt.cpan.org/Public/Dist/Display.html?Name=B-Hooks-EndOfScope>\n(or bug-B-Hooks-EndOfScope@rt.cpan.org <mailto:bug-B-Hooks-\nEndOfScope@rt.cpan.org>).\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "o   Florian Ragwitz <rafl@debian.org>\n\no   Peter Rabbitson <ribasushi@leporine.io>\n",
                "subsections": []
            },
            "CONTRIBUTORS": {
                "content": "o   Karen Etheridge <ether@cpan.org>\n\no   Christian Walde <walde.christian@googlemail.com>\n\no   Graham Knop <haarg@haarg.org>\n\no   Simon Wilper <sxw@chronowerks.de>\n\no   Tatsuhiko Miyagawa <miyagawa@bulknews.net>\n\no   Tomas Doran <bobtfish@bobtfish.net>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENCE": {
                "content": "This software is copyright (c) 2008 by Florian Ragwitz.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n\nperl v5.32.1                      2021-10-15         B::Hooks::EndOfScope(3pm)",
                "subsections": []
            }
        }
    }
}