MooseX...::Class(3pm)
π¦ MooseX::MethodAttributes::Role::Meta::Class π
okay bestie, so this is a page from the User Contributed Perl Documentation collection, and it's the manual for MooseX::MethodAttributes::Role::Meta::Class β a metaclass role that's literally just vibing there, storing your code attributes. that's its whole job. it's giving β¨backstage crewβ¨. nobody sees it, but the show does not go on without it.
β¨ VERSION β¨
version 0.32 β that's the one, that's the moment π
π§ METHODS π§
these are the three little functions this role hands you. all of them are about meta methods that have attributes. periodt.
get_method_with_attributes_listβ grabs you the list of meta methods for the local methods of this class that have attributes, in the exact order they were registered. no sorting, no shuffling, just the order they showed up in. πget_all_methods_with_attributesβ same idea but bigger: this one gets the meta methods of both local and inherited methods that have attributes. and the ordering rules? iconic, honestly:- base class methods come before subclass methods
- within one single class, methods keep the order they were declared in
get_nearest_methods_with_attributesβ basically the same asget_all_methods_with_attributes, with one big twist: methods from parent classes get left out if there's an attribute-less method hanging out in a child class. the child wins. sorry to the ancestors, it's giving main character energy π
so like, for example, given this:
package BaseClass;
sub foo : Attr {}
sub bar : Attr {}
package SubClass;
use base qw/BaseClass/;
sub foo {}
after bar => sub {}
SubClass->meta->get_all_methods_with_attributes will return BaseClass->meta->get_method('foo') for the example above. but this method will not β it'll return the wrapped bar method instead, whereas get_all_methods_with_attributes returns the original method. subtle difference, huge consequences, iykyk π
πΈ SUPPORT πΈ
got a bug? bestie, don't suffer in silence, submit it through the RT bug tracker:
https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-MethodAttributes
or you can email it straight to:
bug-MooseX-MethodAttributes@rt.cpan.org
there's also a mailing list for users of this distribution, right here:
http://lists.perl.org/list/moose.html
and if you wanna just chat, there's an irc channel for users of this distribution too: #moose on irc.perl.org, aka irc://irc.perl.org/#moose π«Ά
π AUTHORS π
- Florian Ragwitz
<rafl@debian.org> - Tomas Doran
<bobtfish@bobtfish.net>
absolute legends, no cap π
π COPYRIGHT AND LICENCE π
This software is copyright (c) 2009 by Florian Ragwitz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
so yeah, go wild, remix it, redistribute it β just keep it under the same terms as Perl 5 itself. it's free, it's generous, it's the community spirit fr fr π
and that's the whole page, bestie!! π this one shipped as perl v5.30.3 and got dated <yellow>2020-08-31</yellow> β a little time capsule from the MooseX...::Class(3pm) era. go forth and attribute responsibly πβ¨ππ¦πΈπ
π¦ where this page comes from
- debian bookworm: libmoosex-methodattributes-perl 0.32-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmoosex-methodattributes-perl 0.32-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libmoosex-methodattributes-perl 0.32-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmoosex-methodattributes-perl 0.32-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmoosex-methodattributes-perl 0.32-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmoosex-methodattributes-perl 0.32-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms