MooseX...bleHash(3pm)
π MooseX::AttributeHelpers::Collection::ImmutableHash π
okay bestie, so this page lives in the MooseX...bleHash(3pm) spot in your manual β yes the name got chopped by the terminal, it's giving "my name is too long for the header" energy, but it's literally MooseX::AttributeHelpers::Collection::ImmutableHash and it's the immutable HashRef attribute type. no cap.
version 0.25 btw π
β¨ SYNOPSIS β¨
like, here's the whole vibe in code, copy it exactly fr fr:
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',
}
);
look at her. she's ro, she's got a HashRef[Str], she's handing out named methods like candy. main character energy π
πΈ DESCRIPTION πΈ
so what this module does is hand you an immutable HashRef attribute β like, once it exists, that's it, no take-backs β and it comes with a whole little squad of hash-line operations you can call on it. it's giving "look but don't touch" but make it useful π¦
and if you wanna know the deets on all those operations, the way that you do that is you go read MooseX::AttributeHelpers::MethodProvider::ImmutableHash. she has the full breakdown. iykyk π
π§ METHODS π§
the whole roster, no skipping, every single one:
metaβ the meta, as one doesmethod_providerβ the thing that provides the methodshas_method_providerβ checks whether it has a method providerhelper_typeβ the helper type
periodt. that's the list π
π«Ά SUPPORT π«Ά
got bugs? we love a bug report (affectionate). you can submit them through the RT bug tracker at https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-AttributeHelpers β and yeah the URL wraps weird in the original, that's just how it do β or you can email bug-MooseX-AttributeHelpers@rt.cpan.org. either way, we got you π
there's also a mailing list for users of this distribution, over at http://lists.perl.org/list/moose.html. come thru β¨
and there's an irc channel for users of this distribution too β #moose on irc.perl.org, aka irc://irc.perl.org/#moose. hop in, say hi, it's a whole vibe π
π AUTHOR π
Stevan Little <stevan@iinteractive.com> β the icon, the legend, the moment. 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. slay π
just a lil reminder bestie: the "immutable" in the name is not a suggestion, it's the whole point. don't be out here trying to mutate her π
and that's the page!! this was perl v5.34.0, dated 2022-06-15, and the manual name is MooseX...bleHash(3pm) because the header ran out of room for the full glow-up. love that for us. mwah π
π¦ 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