MooseX...:Array(3pm)
β¨ MooseX::AttributeHelpers::Trait::Collection::Array β Array attribute β¨
okay bestie, pull up a chair π«Ά this is a page from the User Contributed Perl Documentation and it's all about making your Moose attributes do array things. it's giving "let my object hold a whole lil list and let me poke at it" energy. version 0.25, no cap π
πΈ SYNOPSIS πΈ
package Stuff;
use Moose;
use MooseX::AttributeHelpers;
has 'options' => (
metaclass => 'Collection::Array',
is => 'ro',
isa => 'ArrayRef[Int]',
default => sub { [] },
provides => {
'push' => 'add_options',
'pop' => 'remove_last_option',
}
);
look at that. metaclass => 'Collection::Array' and suddenly your options attribute is a whole array situation, and you're out here handing out named methods like add_options and remove_last_option like party favours π iconic behaviour, honestly.
π¦ DESCRIPTION π¦
so like, this module gives you an Array attribute that comes with a whole bunch of array operations baked right in. it's literally the "here's a list, go wild" trait.
if you want the full tea on which operations you get and how they behave, go read MooseX::AttributeHelpers::MethodProvider::Array β that's where the details live, bestie. this page is just the vibe check π
π METHODS π
these are the methods, and yes they're all here, we're not skipping a single one:
metamethod_providerhas_method_providerhelper_type
π SUPPORT π
got a bug? it happens to the best of us π you can submit it through the RT bug tracker:
https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-AttributeHelpers
or, if you're feeling email-y about it:
bug-MooseX-AttributeHelpers@rt.cpan.org
there's also a mailing list for users of this distribution, hanging out at:
http://lists.perl.org/list/moose.html
and if you wanna chat live, there's an irc channel for users of this distribution too β it's #moose on irc.perl.org:
irc://irc.perl.org/#moose
come through, the moose people are lovely fr fr π«Ά
π AUTHOR π
Stevan Little <stevan@iinteractive.com>
π 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 π this wasperl v5.34.0, dated2022-06-15, and yeah the manual title got a lil shortened toMooseX...:Array(3pm)in the footer but you know exactly what it is. slay, go build something with arrays in it β¨ππ¦
π¦ 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