MooseX...ndling(3pm)

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

πŸ’– MooseX::Declare::Syntax::InnerSyntaxHandling πŸ’–

okay bestie, so this is the manual page for MooseX::Declare::Syntax::InnerSyntaxHandling (from the User Contributed Perl Documentation, iykyk) and it's giving keywords inside blocks energy. let's get into it 🫢


✨ VERSION ✨

version 0.43 β€” that's the one, no cap πŸ’…


🌸 DESCRIPTION 🌸

so basically, this role lets you set up keyword handlers that are only available inside blocks or other scoping environments. like, they don't exist out in the open, they only pop off when you're nested inside something. lowkey iconic scoping behaviour fr fr πŸ¦‹


πŸ‘‘ METHODS πŸ‘‘

πŸ’œ default_inner

ArrayRef[Object] Object->default_inner ()

returns an empty ArrayRef by default. that's it, that's the whole vibe.

if you wanna set up extra keywords on top of that? you're gonna have to around this method. no shortcuts, bestie β€” wrap it or it's not happening ✨


πŸŽ€ setup_inner_for

Object->setup_inner_for(ClassName $class, %args)

sets up all the handlers in the inner class. all of them. every single one. it's a whole moment πŸ’…


πŸ”₯ REQUIRED METHODS πŸ”₯

🧚 get_identifier

Str get_identifier ()

you have to make this return the name of the identifier of the current handler. required means required β€” no get_identifier, no vibes. periodt 🌈


πŸ¦‹ MODIFIED METHODS πŸ¦‹

πŸ’€ setup_for

Object->setup_for(ClassName $class, %args)

after the keyword gets set up inside itself, this will call setup_inner_for. so it's doing the outer thing, then handing off to the inner thing. main character energy honestly πŸ‘‘


⭐ SEE ALSO ⭐

  • MooseX::Declare
  • MooseX::Declare::Syntax::NamespaceHandling
  • MooseX::Declare::Syntax::MooseSetup

go read those too bestie, they're all connected 🫢


🌟 AUTHOR 🌟

Florian Ragwitz <rafl@debian.org> β€” we stan πŸ’–


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!! thanks for coming to my ted talk πŸŽ€

okay so final sign-off: this was perl v5.34.0, dated 2022-06-15, and it's the MooseX...ndling(3pm) page from the User Contributed Perl Documentation. slay, bye bestie πŸŒΈβœ¨πŸ’œ

πŸ“¦ where this page comes from