{
    "mode": "perldoc",
    "parameter": "Moose::Cookbook::Meta::WhyMeta",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Moose%3A%3ACookbook%3A%3AMeta%3A%3AWhyMeta/json",
    "generated": "2026-10-08T12:38:51Z",
    "sections": {
        "NAME": {
            "content": "Moose::Cookbook::Meta::WhyMeta - Welcome to the meta world (Why Go Meta?)\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 2.2207\n",
            "subsections": []
        },
        "SUMMARY": {
            "content": "You might want to read Moose::Manual::MOP if you haven't done so yet.\n\nIf you've ever thought \"Moose is great, but I wish it did X differently\", then you've gone meta.\nThe meta recipes demonstrate how to change and extend the way Moose works by extending and\noverriding how the meta classes (Moose::Meta::Class, Moose::Meta::Attribute, etc) work.\n\nThe metaclass API is a set of classes that describe classes, roles, attributes, etc. The\nmetaclass API lets you ask questions about a class, like \"what attributes does it have?\", or\n\"what roles does the class do?\"\n\nThe metaclass system also lets you make changes to a class, for example by adding new methods or\nattributes.\n\nThe interface presented by Moose.pm (\"has\", \"with\", \"extends\") is just a thin layer of syntactic\nsugar over the underlying metaclass system.\n\nBy extending and changing how this metaclass system works, you can create your own Moose\nvariant.\n",
            "subsections": [
                {
                    "name": "Examples",
                    "content": "Let's say that you want to add additional properties to attributes. Specifically, we want to add\na \"label\" property to each attribute, so we can write\n\"My::Class->meta()->getattribute('size')->label()\". The first recipe shows how to do this using\nan attribute trait.\n\nYou might also want to add additional properties to your metaclass. For example, if you were\nwriting an ORM based on Moose, you could associate a table name with each class via the class's\nmetaclass object, letting you write \"My::Class->meta()->tablename()\".\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "Many of the MooseX modules on CPAN implement metaclass extensions. A couple good examples\ninclude MooseX::Aliases and MooseX::UndefTolerant. For a more complex example see Fey::ORM or\nBread::Board::Declare.\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": []
        }
    },
    "summary": "Moose::Cookbook::Meta::WhyMeta - Welcome to the meta world (Why Go Meta?)",
    "flags": [],
    "examples": [],
    "see_also": []
}