{
    "content": [
        {
            "type": "text",
            "text": "# Test2::Util::ExternalMeta (perldoc)\n\n## NAME\n\nTest2::Util::ExternalMeta - Allow third party tools to safely attach meta-data to your instances.\n\n## SYNOPSIS\n\npackage My::Object;\nuse strict;\nuse warnings;\nuse Test2::Util::ExternalMeta qw/meta getmeta setmeta deletemeta/;\n...\nNow to use it:\nmy $inst = My::Object->new;\n$inst->setmeta(foo => 'bar');\nmy $val = $inst->getmeta('foo');\nWHERE IS THE DATA STORED?\nThis package assumes your instances are blessed hashrefs, it will not work if that is not true.\nIt will store all meta-data in the \"meta\" key on your objects hash. If your object makes use of\nthe \"meta\" key in its underlying hash, then there is a conflict and you cannot use this\npackage.\n\n## DESCRIPTION\n\nThis package lets you define a clear, and consistent way to allow third party tools to attach\nmeta-data to your instances. If your object consumes this package, and imports its methods, then\nthird party meta-data has a safe place to live.\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION**\n- **SYNOPSIS**\n- **EXPORTS**\n- **META-KEY RESTRICTIONS**\n- **SOURCE**\n- **MAINTAINERS**\n- **AUTHORS**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Test2::Util::ExternalMeta",
        "section": "",
        "mode": "perldoc",
        "summary": "Test2::Util::ExternalMeta - Allow third party tools to safely attach meta-data to your instances.",
        "synopsis": "package My::Object;\nuse strict;\nuse warnings;\nuse Test2::Util::ExternalMeta qw/meta getmeta setmeta deletemeta/;\n...\nNow to use it:\nmy $inst = My::Object->new;\n$inst->setmeta(foo => 'bar');\nmy $val = $inst->getmeta('foo');\nWHERE IS THE DATA STORED?\nThis package assumes your instances are blessed hashrefs, it will not work if that is not true.\nIt will store all meta-data in the \"meta\" key on your objects hash. If your object makes use of\nthe \"meta\" key in its underlying hash, then there is a conflict and you cannot use this\npackage.",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 21,
                "subsections": []
            },
            {
                "name": "EXPORTS",
                "lines": 16,
                "subsections": []
            },
            {
                "name": "META-KEY RESTRICTIONS",
                "lines": 4,
                "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::Util::ExternalMeta - Allow third party tools to safely attach meta-data to your\ninstances.\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This package lets you define a clear, and consistent way to allow third party tools to attach\nmeta-data to your instances. If your object consumes this package, and imports its methods, then\nthird party meta-data has a safe place to live.\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "package My::Object;\nuse strict;\nuse warnings;\n\nuse Test2::Util::ExternalMeta qw/meta getmeta setmeta deletemeta/;\n\n...\n\nNow to use it:\n\nmy $inst = My::Object->new;\n\n$inst->setmeta(foo => 'bar');\nmy $val = $inst->getmeta('foo');\n\nWHERE IS THE DATA STORED?\nThis package assumes your instances are blessed hashrefs, it will not work if that is not true.\nIt will store all meta-data in the \"meta\" key on your objects hash. If your object makes use of\nthe \"meta\" key in its underlying hash, then there is a conflict and you cannot use this\npackage.\n",
                "subsections": []
            },
            "EXPORTS": {
                "content": "$val = $obj->meta($key)\n$val = $obj->meta($key, $default)\nThis will get the value for a specified meta $key. Normally this will return \"undef\" when\nthere is no value for the $key, however you can specify a $default value to set when no\nvalue is already set.\n\n$val = $obj->getmeta($key)\nThis will get the value for a specified meta $key. This does not have the $default overhead\nthat \"meta()\" does.\n\n$val = $obj->deletemeta($key)\nThis will remove the value of a specified meta $key. The old $val will be returned.\n\n$obj->setmeta($key, $val)\nSet the value of a specified meta $key.\n",
                "subsections": []
            },
            "META-KEY RESTRICTIONS": {
                "content": "Meta keys must be defined, and must be true when used as a boolean. Keys may not be references.\nYou are free to stringify a reference \"$ref\" for use as a key, but this package will not\nstringify it for you.\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": []
            }
        }
    }
}