MooseX...ribute(3pm)
π NAME π
MooseX::AttributeShortcuts::Trait::Role::Attribute β it's a role attribute trait whose whole lil job is creating a builder method. π
(Also hi bestie, this is the 3pm page from the User Contributed Perl Documentation, just so you know what you're reading. π«Ά)
πΈ VERSION πΈ
This doc describes version 0.037 of MooseX::AttributeShortcuts::Trait::Role::Attribute β released November 20, 2017 as part of MooseX-AttributeShortcuts. Iconic behavior, honestly. β¨
π¦ DESCRIPTION π¦
Okay so normally, attribute options processing happens at the exact moment an attribute gets created and attached to a class. And there's two ways that goes down, bestie:
- by virtue of a
hasstatement sitting in a class definition, or - when a role gets applied to a class.
And the way that this is not an optimal approach for inline builder methods... π yeah. It's giving "we can do better."
So this is a role attribute trait β it creates builder methods at the time role attributes are created, so that they can be aliased, excluded, etc, like any other role method. Periodt. π
π ROLE PARAMETERS π
Parameterized roles accept parameters that influence their construction. This role accepts the following parameters.
builder_prefix
That's it, that's the parameter, bestie. π The page lists builder_prefix and moves right along β no extra description to give you, so I'm not gonna invent one.
π₯ AROUND METHOD MODIFIERS π₯
new
If we have an inline builder defined in our role options, we swizzle our options such that builder becomes the builder method name, and anon_builder is the anonymous sub. Slay. π
β AFTER METHOD MODIFIERS β
attach_to_role
If we have an inline builder defined in our role options, install it as a method. That's the whole vibe. π¦
π METHODS π
builder_method_metaclass()
Returns the metaclass we'll use to install an inline builder. Simple as that, no cap. β¨
π SEE ALSO π
Please see those modules/websites for more information related to this module.
MooseX::AttributeShortcuts
π BUGS π
Please report any bugs or feature requests on the bugtracker website https://github.com/RsrchBoy/moosex-attributeshortcuts/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. (Fr fr, a test-file or patch makes everything so much easier β that's literally what they're asking for. π)
π AUTHOR π
Chris Weyl <cweyl@alumni.drew.edu>
π«Ά COPYRIGHT AND LICENSE π«Ά
This software is Copyright (c) 2017, 2015, 2014, 2013, 2012, 2011 by Chris Weyl.
This is free software, licensed under:
The GNU Lesser General Public License, Version 2.1, February 1999
And that's the whole page, bestie β you ate it. π
MooseX::AttributeShortcuts::Trait::Role::Attribute was documented for perl v5.34.0 and dated 2022-06-15. Love that for us. ππ
π¦ where this page comes from
- debian bookworm: libmoosex-attributeshortcuts-perl 0.037-2 Β· LGPL-2.1-only
- debian trixie: libmoosex-attributeshortcuts-perl 0.037-2 Β· LGPL-2.1-only
- ubuntu noble: libmoosex-attributeshortcuts-perl 0.037-2 Β· LGPL-2.1-only
- ubuntu resolute: libmoosex-attributeshortcuts-perl 0.037-2 Β· LGPL-2.1-only
- ubuntu stonking: libmoosex-attributeshortcuts-perl 0.037-2 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms