metaclass(3)
π metaclass π
okay bestie, gather round β this is the page for metaclass(3), and it lives in the User Contributed Perl Documentation section of your man pages. Yes we're reading a manpage for fun now. That's just who we are. π
β¨ NAME β¨
metaclass β it's a pragma for installing and using Class::MOP metaclasses π
πΈ VERSION πΈ
version 2.4000 (yes, that's the real number, no I'm not being cute)
π¦ SYNOPSIS π¦
package MyClass;
# use Class::MOP::Class
use metaclass;
# ... or use a custom metaclass
use metaclass 'MyMetaClass';
# ... or use a custom metaclass
# and custom attribute and method
# metaclasses
use metaclass 'MyMetaClass' => (
'attribute_metaclass' => 'MyAttributeMetaClass',
'method_metaclass' => 'MyMethodMetaClass',
);
# ... or just specify custom attribute
# and method classes, and Class::MOP::Class
# is the assumed metaclass
use metaclass (
'attribute_metaclass' => 'MyAttributeMetaClass',
'method_metaclass' => 'MyMethodMetaClass',
);
# if we'd rather not install a 'meta' method, we can do this
use metaclass meta_name => undef;
# or if we'd like it to have a different name,
use metaclass meta_name => 'my_meta';
look at all those options, she's versatile, she contains multitudes πβ¨
π DESCRIPTION π
So basically? This is a pragma whose whole job is making it easy to use one specific metaclass plus a whole little squad of custom attribute and method metaclasses. π«Ά
And it also installs a "meta" method onto your class. Free of charge. Iconic behaviour honestly.
UNLESS β and this is the plot twist β you pass undef to the meta_name option. Then no meta method for you. π
β οΈ real talk bestie: if you're using Moose, you most likely do NOT want to be using this. Go look into Moose::Util::MetaRole instead. That's the one for you. π
π AUTHORS π
the literal legends who made this happen:
- Stevan Little <stevan@cpan.org>
- Dave Rolsky <autarch@urth.org>
- Jesse Luehrs <doy@cpan.org>
- Shawn M Moore <sartak@cpan.org>
- ΧΧΧΧ Χ§ΧΧ'ΧΧ (Yuval Kogman) <nothingmuch@woobling.org>
- Karen Etheridge <ether@cpan.org>
- Florian Ragwitz <rafl@debian.org>
- Hans Dieter Pearcey <hdp@cpan.org>
- Chris Prather <chris@prather.org>
- Matt S Trout <mstrout@cpan.org>
every single one of them, we stan π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2006 by Infinity Interactive, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. π
and that's the whole page, bestie β you ate that. mwah π
this has been metaclass(3) from perl v5.42.0, dated 2025-07-25 β catch you in the next manpage, love you, bye π¦β¨
π¦ where this page comes from
- fedora 43: perl-Moose 2.4000-4.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms