MooseX...leHash(3pm)

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

πŸ’– 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:

  • meta
  • method_provider
  • has_method_provider
  • helper_type

🌈 SUPPORT 🌈

got bugs? πŸ› bestie, same, but like β€” report them properly:

come hang out, the #moose channel is lowkey a whole vibe, iykyk πŸ’œ

🌸 AUTHOR 🌸

Stevan Little <stevan@iinteractive.com> β€” we stan. 🫢


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