{
    "content": [
        {
            "type": "text",
            "text": "# Log::Dispatch::Code (perldoc)\n\n## NAME\n\nLog::Dispatch::Code - Object for logging to a subroutine reference\n\n## SYNOPSIS\n\nuse Log::Dispatch;\nmy $log = Log::Dispatch->new(\noutputs => [\n[\n'Code',\nminlevel => 'emerg',\ncode      => \\&logit,\n],\n]\n);\nsub logit {\nmy %p = @;\nwarn $p{message};\n}\n\n## DESCRIPTION\n\nThis module supplies a simple object for logging to a subroutine reference.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **CONSTRUCTOR**\n- **HOW IT WORKS**\n- **SUPPORT**\n- **SOURCE**\n- **AUTHOR**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Log::Dispatch::Code",
        "section": "",
        "mode": "perldoc",
        "summary": "Log::Dispatch::Code - Object for logging to a subroutine reference",
        "synopsis": "use Log::Dispatch;\nmy $log = Log::Dispatch->new(\noutputs => [\n[\n'Code',\nminlevel => 'emerg',\ncode      => \\&logit,\n],\n]\n);\nsub logit {\nmy %p = @;\nwarn $p{message};\n}",
        "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": 18,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "CONSTRUCTOR",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "HOW IT WORKS",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "SUPPORT",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SOURCE",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 8,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Log::Dispatch::Code - Object for logging to a subroutine reference\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version 2.70\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Log::Dispatch;\n\nmy $log = Log::Dispatch->new(\noutputs => [\n[\n'Code',\nminlevel => 'emerg',\ncode      => \\&logit,\n],\n]\n);\n\nsub logit {\nmy %p = @;\n\nwarn $p{message};\n}\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This module supplies a simple object for logging to a subroutine reference.\n",
                "subsections": []
            },
            "CONSTRUCTOR": {
                "content": "The constructor takes the following parameters in addition to the standard parameters documented\nin Log::Dispatch::Output:\n\n*   code ($)\n\nThe subroutine reference.\n",
                "subsections": []
            },
            "HOW IT WORKS": {
                "content": "The subroutine you provide will be called with a hash of named arguments. The two arguments are:\n\n*   level\n\nThe log level of the message. This will be a string like \"info\" or \"error\".\n\n*   message\n\nThe message being logged.\n",
                "subsections": []
            },
            "SUPPORT": {
                "content": "Bugs may be submitted at <https://github.com/houseabsolute/Log-Dispatch/issues>.\n\nI am also usually active on IRC as 'autarch' on \"irc://irc.perl.org\".\n",
                "subsections": []
            },
            "SOURCE": {
                "content": "The source code repository for Log-Dispatch can be found at\n<https://github.com/houseabsolute/Log-Dispatch>.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Dave Rolsky <autarch@urth.org>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "This software is Copyright (c) 2020 by Dave Rolsky.\n\nThis is free software, licensed under:\n\nThe Artistic License 2.0 (GPL Compatible)\n\nThe full text of the license can be found in the LICENSE file included with this distribution.\n",
                "subsections": []
            }
        }
    }
}