MooseX...n::Hash(3pm)

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

πŸ’– NAME πŸ’–

MooseX::AttributeHelpers::Trait::Collection::Hash β€” bestie, it's literally the Hash attribute trait. That's it, that's the whole vibe. πŸŽ€


✨ VERSION ✨

version 0.25 β€” yes queen, we're on 0.25 and we're thriving πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's how you actually use it, no cap:

package Stuff;
use Moose;
use MooseX::AttributeHelpers;

has 'options' => (
    metaclass => 'Collection::Hash',
    is        => 'ro',
    isa       => 'HashRef[Str]',
    default   => sub { {} },
    provides  => {
        'set'    => 'set_option',
        'get'    => 'get_option',
        'empty'  => 'has_options',
        'count'  => 'num_options',
        'delete' => 'delete_option',
    }
);

like... look at her. metaclass => 'Collection::Hash', is => 'ro', isa => 'HashRef[Str]', a default of sub { {} }, and then provides handing you a whole little squad of generated methods. main character behavior fr fr πŸ‘‘


🌸 DESCRIPTION 🌸

So this module hands you a Hash attribute that comes with a bunch of hash-like operations built in. The way that it just gives you those methods... obsessed.

Wanna know more? Go read MooseX::AttributeHelpers::MethodProvider::Hash β€” that's where the actual deets live. iykyk πŸ’œ


πŸ’… METHODS πŸ’…

  • meta β€” the meta thing. iconic.
  • method_provider β€” gives you the method provider. slay.
  • has_method_provider β€” checks if there's a method provider. vibe check βœ…
  • helper_type β€” the helper type. periodt.

🫢 SUPPORT 🫢

Got bugs? bestie, don't suffer in silence 😭 send them through the RT bug tracker at <https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-AttributeHelpers> β€” or if email is more your thing, it's bug-MooseX-AttributeHelpers@rt.cpan.org <mailto:bug-MooseX-AttributeHelpers@rt.cpan.org>.

There's also a mailing list for users of this distribution, right here: <http://lists.perl.org/list/moose.html>. come hang out πŸ“

And there's an irc channel too, for users of this distribution: "#moose" on "irc.perl.org" <irc://irc.perl.org/#moose>. real ones know 🌈


πŸ‘‘ AUTHOR πŸ‘‘

Stevan Little <stevan@iinteractive.com> β€” thank you for your service, king 🫑


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. so like... go wild, legally πŸ’…


perl v5.34.0 Β· 2022-06-15 Β· and that's the whole MooseX...n::Hash(3pm) moment bestie, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from