MooseX...spaced(3pm)

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

πŸ’– MooseX...spaced πŸ’–

ok so bestie, this is a User Contributed Perl Documentation page, and the module is MooseX::Declare::Context::Namespaced β€” yes the filename is literally MooseX...spaced, iconic of the manpage system to truncate it like that ngl. It's giving "namespaced context" and it's lowkey a little legend. πŸŽ€


✨ VERSION ✨

version 0.43 πŸ¦‹


🌸 DESCRIPTION 🌸

So this context trait? It adds namespace functionality to the context. That's the whole vibe. It shows up, it makes namespaces happen, it slays. πŸ’…


πŸ‘‘ ATTRIBUTES πŸ‘‘

namespace

This one gets set when the strip_namespace method gets called β€” but only if the namespace wasn't anonymous, okay? Important distinction bestie. It will contain the namespace you specified, and NOT the fully qualified one. Just the specified one. Periodt. ✨


🧚 METHODS 🧚

strip_namespace

Maybe[Str] Object->strip_namespace()

This method is literally built to parse the main namespace of a namespaced keyword. What it does is use the strip_word method from Devel::Declare::Context::Simple, and then it stores that result in the namespace attribute β€” if it's true, that is. If it's not true, no storing, no nothing. πŸ™ˆ

qualify_namespace

Str Object->qualify_namespace(Str $namespace)

Okay so here's the tea: if the $namespace you pass in begins with a ::, then it gets prefixed with the outer namespace that's in the file. But β€” and this is the dramatic part β€” if there is no outer namespace, an error will be thrown. 😭 Like full stop, error, done. So make sure you've got an outer namespace before you come at it with the ::, fr fr. πŸ”₯


🌈 SEE ALSO 🌈

  • MooseX::Declare
  • MooseX::Declare::Context

go read those too, they're part of the family 🫢


πŸ’œ AUTHOR πŸ’œ

Florian Ragwitz <rafl@debian.org> β€” king behavior, 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. So like, go forth and remix, bestie, legally. ⭐


k bye, this was documented by the Perl crew on 2022-06-15 using perl v5.34.0 β€” shoutout to the manpage renderer for the MooseX...spaced(3pm) glow-up at the top and bottom of every page πŸ’–πŸŒΈπŸŽ€
πŸ“¦ where this page comes from