MooseX...ndling(3pm)

πŸ“¦
version 0.43 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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::Declare
  • MooseX::Declare::Context

πŸŽ€ AUTHOR πŸŽ€

Florian Ragwitz <rafl@debian.org> β€” the originator, the blueprint, the moment. πŸ™Œ


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