{
    "mode": "perldoc",
    "parameter": "metaclass",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/metaclass/json",
    "generated": "2026-06-15T13:39:38Z",
    "synopsis": "package MyClass;\n# use Class::MOP::Class\nuse metaclass;\n# ... or use a custom metaclass\nuse metaclass 'MyMetaClass';\n# ... or use a custom metaclass\n# and custom attribute and method\n# metaclasses\nuse metaclass 'MyMetaClass' => (\n'attributemetaclass' => 'MyAttributeMetaClass',\n'methodmetaclass'    => 'MyMethodMetaClass',\n);\n# ... or just specify custom attribute\n# and method classes, and Class::MOP::Class\n# is the assumed metaclass\nuse metaclass (\n'attributemetaclass' => 'MyAttributeMetaClass',\n'methodmetaclass'    => 'MyMethodMetaClass',\n);\n# if we'd rather not install a 'meta' method, we can do this\nuse metaclass metaname => undef;\n# or if we'd like it to have a different name,\nuse metaclass metaname => 'mymeta';",
    "sections": {
        "NAME": {
            "content": "metaclass - a pragma for installing and using Class::MOP metaclasses\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 2.2200\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "package MyClass;\n\n# use Class::MOP::Class\nuse metaclass;\n\n# ... or use a custom metaclass\nuse metaclass 'MyMetaClass';\n\n# ... or use a custom metaclass\n# and custom attribute and method\n# metaclasses\nuse metaclass 'MyMetaClass' => (\n'attributemetaclass' => 'MyAttributeMetaClass',\n'methodmetaclass'    => 'MyMethodMetaClass',\n);\n\n# ... or just specify custom attribute\n# and method classes, and Class::MOP::Class\n# is the assumed metaclass\nuse metaclass (\n'attributemetaclass' => 'MyAttributeMetaClass',\n'methodmetaclass'    => 'MyMethodMetaClass',\n);\n\n# if we'd rather not install a 'meta' method, we can do this\nuse metaclass metaname => undef;\n# or if we'd like it to have a different name,\nuse metaclass metaname => 'mymeta';\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This is a pragma to make it easier to use a specific metaclass and a set of custom attribute and\nmethod metaclasses. It also installs a \"meta\" method to your class as well, unless \"undef\" is\npassed to the \"metaname\" option.\n\nNote that if you are using Moose, you most likely do not want to be using this - look into\nMoose::Util::MetaRole instead.\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": "metaclass - a pragma for installing and using Class::MOP metaclasses",
    "flags": [],
    "examples": [],
    "see_also": []
}