MooseX...Method(3pm)
π MooseX::Declare::Syntax::Keyword::Method π
okay bestie, so this page is MooseX...Method(3pm) from the User Contributed Perl Documentation, and it is literally all about the role that handles method declarations. it's giving β¨plumbingβ¨ but the important kind, iykyk.
VERSION: version 0.43 π
β¨ NAME β¨
MooseX::Declare::Syntax::Keyword::Method β Handle method declarations π«Ά
πΈ DESCRIPTION πΈ
so this role? it's an extension of MooseX::Declare::Syntax::MethodDeclaration, and what it does is let you install keywords that declare methods. that's it. that's the whole vibe. it's a glow-up on the base declaration role so your keywords can actually spit out methods. π₯
π METHODS π
register_method_declaration
Object->register_method_declaration (Object $metaclass, Str $name, Object $method)
this one is required by the method declaration role, and its whole job is to register the finished method object via the $metaclass->add_method method. like, that's the moment where the method actually becomes A Method. main character energy fr fr. π
MethodModifier->new(
identifier => 'around',
modifier_type => 'around',
prototype_injections => {
declarator => 'around',
injections => [ 'CodeRef $orig' ],
},
);
and what that lil config means, bestie, is that the signature (Str $foo) will become CodeRef $orig: Object $self, Str $foo, and () will become CodeRef $orig: Object $self. the injections literally get slotted in at the front, no cap. π¦
π§ CONSUMES π§
MooseX::Declare::Syntax::MethodDeclaration
π SEE ALSO π
MooseX::DeclareMooseX::Declare::Syntax::MooseSetupMooseX::Declare::Syntax::MethodDeclarationMooseX::Method::Signatures
π AUTHOR π
Florian Ragwitz <rafl@debian.org> π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2008 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. slay, honestly. legal but cute. β
ok that's the whole page, you ate it, go forth and declare some methods π«Ά
so yeah β this page comes to you from perl v5.34.0, dated 2022-06-15, and it's MooseX...Method(3pm) living its best life in the Perl docs. mwah π
π¦ where this page comes from
- debian bookworm: libmoosex-declare-perl 0.43-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmoosex-declare-perl 0.43-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmoosex-declare-perl 0.43-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmoosex-declare-perl 0.43-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmoosex-declare-perl 0.43-2 Β· 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