MooseX...n::Hash(3pm)
π 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 π«‘
π 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. 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
- 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