{
    "content": [
        {
            "type": "text",
            "text": "# Moose::Cookbook::Snack::Keywords (perldoc)\n\n## NAME\n\nMoose::Cookbook::Snack::Keywords - Restricted \"keywords\" in Moose\n\n## DESCRIPTION\n\nMoose exports a number of sugar functions in order to emulate Perl built-in keywords. These can\ncause clashes with other user-defined functions. This document provides a list of those keywords\nfor easy reference.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **DESCRIPTION** (4 subsections)\n- **SEE ALSO**\n- **AUTHORS**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Moose::Cookbook::Snack::Keywords",
        "section": "",
        "mode": "perldoc",
        "summary": "Moose::Cookbook::Snack::Keywords - Restricted \"keywords\" in Moose",
        "synopsis": null,
        "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": "DESCRIPTION",
                "lines": 4,
                "subsections": [
                    {
                        "name": "The 'meta' keyword",
                        "lines": 10
                    },
                    {
                        "name": "Moose Keywords",
                        "lines": 16
                    },
                    {
                        "name": "Moose::Util::TypeConstraints Keywords",
                        "lines": 19
                    },
                    {
                        "name": "Avoiding collisions",
                        "lines": 46
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Moose::Cookbook::Snack::Keywords - Restricted \"keywords\" in Moose\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version 2.2200\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Moose exports a number of sugar functions in order to emulate Perl built-in keywords. These can\ncause clashes with other user-defined functions. This document provides a list of those keywords\nfor easy reference.\n",
                "subsections": [
                    {
                        "name": "The 'meta' keyword",
                        "content": "\"use Moose\" adds a method called \"meta\" to your class. If this conflicts with a method or\nfunction you are using, you can rename it, or prevent it from being installed entirely. To do\nthis, pass the \"-metaname\" option when you \"use Moose\". For instance:\n\n# install it under a different name\nuse Moose -metaname => 'moosemeta';\n\n# don't install it at all\nuse Moose -metaname => undef;\n"
                    },
                    {
                        "name": "Moose Keywords",
                        "content": "If you are using Moose or Moose::Role it is best to avoid these keywords:\n\nextends\nwith\nhas\nbefore\nafter\naround\nsuper\noverride\ninner\naugment\nconfess\nblessed\nmeta\n"
                    },
                    {
                        "name": "Moose::Util::TypeConstraints Keywords",
                        "content": "If you are using Moose::Util::TypeConstraints it is best to avoid these keywords:\n\ntype\nsubtype\nclasstype\nroletype\nmaybetype\nducktype\nas\nwhere\nmessage\ninlineas\ncoerce\nfrom\nvia\nenum\nfindtypeconstraint\nregistertypeconstraint\n"
                    },
                    {
                        "name": "Avoiding collisions",
                        "content": "Turning off Moose\nTo remove the sugar functions Moose exports, just add \"no Moose\" at the bottom of your code:\n\npackage Thing;\nuse Moose;\n\n# code here\n\nno Moose;\n\nThis will unexport the sugar functions that Moose originally exported. The same will also work\nfor Moose::Role and Moose::Util::TypeConstraints.\n\nSub::Exporter features\nMoose, Moose::Role and Moose::Util::TypeConstraints all use Sub::Exporter to handle all their\nexporting needs. This means that all the features that Sub::Exporter provides are also available\nto them.\n\nFor instance, with Sub::Exporter you can rename keywords, like so:\n\npackage LOL::Cat;\nuse Moose 'has' => { -as => 'icanhaz' };\n\nicanhaz 'cheeseburger' => (\nis      => 'rw',\ntrigger => sub { print \"NOM NOM\" }\n);\n\nLOL::Cat->new->cheeseburger('KTHNXBYE');\n\nSee the Sub::Exporter docs for more information.\n\nnamespace::autoclean and namespace::clean\nYou can also use namespace::autoclean to clean up your namespace. This will remove all imported\nfunctions from your namespace. Note that if you are importing functions that are intended to be\nused as methods (this includes overload, due to internal implementation details), it will remove\nthese as well.\n\nAnother option is to use namespace::clean directly, but you must be careful not to remove \"meta\"\nwhen doing so:\n\npackage Foo;\nuse Moose;\nuse namespace::clean -except => 'meta';\n# ...\n"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "Moose\nMoose::Role\nMoose::Util::TypeConstraints\nSub::Exporter\nnamespace::autoclean\nnamespace::clean\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "*   Stevan Little <stevan@cpan.org>\n\n*   Dave Rolsky <autarch@urth.org>\n\n*   Jesse Luehrs <doy@cpan.org>\n\n*   Shawn M Moore <sartak@cpan.org>\n\n*   יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>\n\n*   Karen Etheridge <ether@cpan.org>\n\n*   Florian Ragwitz <rafl@debian.org>\n\n*   Hans Dieter Pearcey <hdp@cpan.org>\n\n*   Chris Prather <chris@prather.org>\n\n*   Matt S Trout <mstrout@cpan.org>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "This software is copyright (c) 2006 by Infinity Interactive, Inc.\n\nThis is free software; you can redistribute it and/or modify it under the same terms as the Perl\n5 programming language system itself.\n",
                "subsections": []
            }
        }
    }
}