MooseX...ration(3pm)
π MooseX::Declare::Syntax::MethodDeclaration β ok bestie, let's talk π
aka MooseX...ration(3pm) β yeah the header truncated it, that's just the manual name doing its little thing, don't worry about it π
VERSION: version 0.43 β¨
πΈ DESCRIPTION πΈ
It's a role for keyword handlers, okay? Like, it hands you a whole framework so you can add methods β or add things that merely look like methods, which, same energy honestly β and modify them. That's the whole vibe. π¦
π ATTRIBUTES π
prototype_injections
Optional little structure that describes extra stuff to be injected into a method's signature. π
The popular example of this? It lives in the around method modifier handler:
ngl that's where everyone points when they want to see it in the wild π«Ά
β¨ METHODS β¨
parse
Object->parse (Object $ctx);
Reads a name and a prototype, builds the method meta object, and then registers it into the current class. How? Using MooseX::Method::Signatures plus a custom_method_application that calls register_method_declaration. That's the whole pipeline, no cap. π₯
π CONSUMES π
MooseX::Declare::Syntax::KeywordHandling
π REQUIRED METHODS π
register_method_declaration
Object->register_method_declaration (Object $metaclass, Str $name, Object $method)
This one gets called with the target metaclass, the final built method meta object, and its name. And here's the iconic part: whatever it returns becomes the value returned right where the method was declared. So likeβ¦ the return value is the whole point. main character behaviour fr π«
π SEE ALSO π
MooseX::DeclareMooseX::Declare::Syntax::NamespaceHandlingMooseX::Declare::Syntax::MooseSetupMooseX::Method::Signatures
π¦ AUTHOR π¦
Florian Ragwitz <rafl@debian.org> β the legend himself π
π 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. πΈ
okay and the lil sign-off from the bottom of the page: this is from perl v5.34.0, dated 2022-06-15, and the manual is MooseX...ration(3pm). that's it, that's the page, slay π
β¨
π¦ 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