MooseX...ndling(3pm)
π MooseX::Declare::Syntax::KeywordHandling π
okay bestie, gather round β this is the manual page for MooseX::Declare::Syntax::KeywordHandling, living in the User Contributed Perl Documentation, and it's giving backstage-pass energy for keyword handlers. π
β¨ VERSION β¨
version 0.43 β that's the vibe, no cap. π¦
πΈ DESCRIPTION πΈ
So like, this role is the communal closet that every single keyword handler in MooseX::Declare gets to raid. It provides the functionality that's common to all keyword handlers. That's it, that's the whole job, and honestly? Iconic. π
π§ ATTRIBUTES π§
identifier
This is the name of the actual keyword. It's a required string, and it has to be in the same format as a usual Perl identifier β so don't get cute with it, bestie, or it will simply not slay. π
π METHODS π
get_identifier
Str Object->get_identifier ()
Returns the name the handler will be setup under. Just hands it to you. A little gift. π«Ά
setup_for
Object->setup_for (ClassName $class, %args)
This one sets up the handler in the $class you specified. When the keyword gets used, the handler will dispatch to the parse_declaration method. β¨
A normal code reference will also be exported into the calling namespace. It's either gonna be empty, or β if a generate_export method is provided β it'll be whatever that method returns. Either way, something gets exported, periodt.
parse_declaration
Object->parse_declaration (Str $filename, HashRef $setup_args, @call_args)
This simply creates a new context and passes it straight on to the parse method. Lowkey the world's shortest relay race. πβοΈπ¨
π REQUIRED METHODS π
parse
Object->parse (Object $context)
This method must implement the actual parsing of the keyword syntax. Like, must must. It's the main character of this whole operation β everything else is just setting the stage for it. π
π₯ SEE ALSO π₯
MooseX::DeclareMooseX::Declare::Context
π AUTHOR π
Florian Ragwitz <rafl@debian.org> β the originator, the blueprint, the moment. π
π 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. π
and that's the whole page, bestie β every last flag, method, and legal line, untouched, just vibing. This was written up against perl v5.34.0, dated 2022-06-15, from the MooseX...ndling(3pm) page. bye pookie, go write some keyword handlers πβ¨
π¦ 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