{
    "content": [
        {
            "type": "text",
            "text": "# MooseX::Role::Parameterized::Extending (perldoc)\n\n## NAME\n\nMooseX::Role::Parameterized::Extending - extending MooseX::Role::Parameterized roles\n\n## DESCRIPTION\n\nThere are heaps of useful modules in the \"MooseX\" namespace that you can use to make your roles\nmore powerful. However, they do not always work out of the box with MooseX::Role::Parameterized,\nbut it's fairly straight-forward to achieve the functionality you desire.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **DESCRIPTION**\n- **SUPPORT**\n- **AUTHOR**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "MooseX::Role::Parameterized::Extending",
        "section": "",
        "mode": "perldoc",
        "summary": "MooseX::Role::Parameterized::Extending - extending MooseX::Role::Parameterized roles",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 1,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 39,
                "subsections": []
            },
            {
                "name": "SUPPORT",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "",
                "subsections": []
            },
            "VERSION": {
                "content": "version 1.11\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "There are heaps of useful modules in the \"MooseX\" namespace that you can use to make your roles\nmore powerful. However, they do not always work out of the box with MooseX::Role::Parameterized,\nbut it's fairly straight-forward to achieve the functionality you desire.\n\nMooseX::Role::Parameterized was designed to be as extensible as the rest of Moose, and as such\nit is possible to apply custom traits to both the parameterizable role or the ordinary roles\nthey generate. In this example, we will look at applying the fake trait \"MooseX::MagicRole\" to a\nparameterizable role.\n\nFirst we need to define a new metaclass for our parameterizable role.\n\npackage MyApp::Meta::Role::Parameterizable;\nuse Moose;\nextends 'MooseX::Role::Parameterized::Meta::Role::Parameterizable';\nwith 'MooseX::MagicRole';\n\nThis is a class (observe that it uses Moose, not Moose::Role) which extends the class which\ngoverns parameterizable roles. MooseX::Role::Parameterized::Meta::Role::Parameterizable is the\nmetaclass that packages using MooseX::Role::Parameterized receive by default.\n\nNote that the class we are extending,\nMooseX::Role::Parameterized::Meta::Role::Parameteriz*able*, is entirely distinct from the\nsimilarly-named class which governs the ordinary roles that parameterized roles generate. An\ninstance of MooseX::Role::Parameterized::Meta::Role::Parameteriz*ed* represents a role with its\nparameters already bound.\n\nNow we can take advantage of our new subclass by specifying that we want to use\n\"MyApp::Meta::Role::Parameterizable\" as our metaclass when importing\nMooseX::Role::Parameterized:\n\npackage MyApp::Role;\nuse MooseX::Role::Parameterized -metaclass => 'MyApp::Meta::Role::Parameterizable';\n\nrole {\n...\n}\n\nAnd there you go! \"MyApp::Role\" now has the \"MooseX::MagicRole\" trait applied.\n",
                "subsections": []
            },
            "SUPPORT": {
                "content": "Bugs may be submitted through the RT bug tracker\n<https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Role-Parameterized> (or\nbug-MooseX-Role-Parameterized@rt.cpan.org <mailto:bug-MooseX-Role-Parameterized@rt.cpan.org>).\n\nThere is also a mailing list available for users of this distribution, at\n<http://lists.perl.org/list/moose.html>.\n\nThere is also an irc channel available for users of this distribution, at \"#moose\" on\n\"irc.perl.org\" <irc://irc.perl.org/#moose>.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Shawn M Moore <code@sartak.org>\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "This software is copyright (c) 2008 by Shawn M Moore.\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": []
            }
        }
    }
}