MooseX...leHash(3pm)
π MooseX::AttributeHelpers::Trait::Collection::ImmutableHash π
okay bestie, gather round, because this is the MooseX::AttributeHelpers::Trait::Collection::ImmutableHash page from your friendly neighborhood User Contributed Perl Documentation, and it's giving immutable HashRef attribute realness. π«Ά
β¨ VERSION β¨
version 0.25 β yes, she's vintage, she's iconic, she's from 2007 and she still slays. π
πΈ SYNOPSIS πΈ
here's the vibe, literally copy-paste this energy:
package Stuff;
use Moose;
use MooseX::AttributeHelpers;
has 'options' => (
metaclass => 'Collection::ImmutableHash',
is => 'ro',
isa => 'HashRef[Str]',
default => sub { {} },
provides => {
'get' => 'get_option',
'empty' => 'has_options',
'keys' => 'get_option_list',
}
);
see how we set metaclass => 'Collection::ImmutableHash', keep it is => 'ro' (read-only queen π), type it as isa => 'HashRef[Str]', give it a default => sub { {} } so it starts out as an empty hash, and then hand out methods with provides? the 'get', 'empty' and 'keys' helpers get renamed to get_option, has_options and get_option_list. no cap. π¦
π DESCRIPTION π
this module hands you an immutable HashRef attribute that comes with a whole bunch of hash-line operations attached. if you want the deep lore on how those methods actually get provided, go read MooseX::AttributeHelpers::MethodProvider::ImmutableHash β she has all the details. β¨
π METHODS π
these are the methods, no more, no less:
metamethod_providerhas_method_providerhelper_type
π SUPPORT π
got bugs? π bestie, same, but like β report them properly:
- Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-AttributeHelpers> (or <mailto:bug-MooseX-AttributeHelpers@rt.cpan.org>).
- There is also a mailing list available for users of this distribution, at <http://lists.perl.org/list/moose.html>.
- There is also an irc channel available for users of this distribution, at
"#moose"on"irc.perl.org"<irc://irc.perl.org/#moose>.
come hang out, the #moose channel is lowkey a whole vibe, iykyk π
πΈ AUTHOR πΈ
Stevan Little <stevan@iinteractive.com> β we stan. π«Ά
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2007 by Stevan Little and Infinity Interactive, Inc.
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!! π mwah π this was MooseX...leHash(3pm) (the title got a lil truncated in the header, we don't talk about it π), built with perl v5.34.0, dated 2022-06-15, and honestly? iconic. periodt. β¨π
π¦ where this page comes from
- debian bookworm: libmoosex-attributehelpers-perl 0.25-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmoosex-attributehelpers-perl 0.25-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmoosex-attributehelpers-perl 0.25-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmoosex-attributehelpers-perl 0.25-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmoosex-attributehelpers-perl 0.25-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