MooseX...n::List(3pm)
π MooseX::AttributeHelpers::Trait::Collection::List β the manual page, but make it cute
okay bestie, welcome to MooseX::AttributeHelpers::Trait::Collection::List (that's the MooseX::AttributeHelpers::Trait::Collection::List(3pm) page, and yes the name is a whole mouthful, we're not even gonna pretend otherwise π). It's version 0.25 and it's here to give your attributes list energy. Not list as in "I have a list of chores", list as in an actual List attribute with a whole bunch of operations attached. Let's go π¦
β¨ NAME β¨
MooseX::AttributeHelpers::Trait::Collection::List β it's a List attribute. That's the whole vibe. A List. Attribute. Periodt. π
πΈ VERSION πΈ
version 0.25 π (an icon, an OG, a legend)
π SYNOPSIS π
okay so picture this: you're building a package, you want an array-ish attribute that comes with built-in methods, and you want it to look this clean:
package Stuff;
use Moose;
use MooseX::AttributeHelpers;
has 'options' => (
metaclass => 'Collection::List',
is => 'ro',
isa => 'ArrayRef[Int]',
default => sub { [] },
provides => {
map => 'map_options',
grep => 'filter_options',
}
);
the way that metaclass => 'Collection::List' just unlocks a whole toolkitβ¦ map and grep get hand-delivered to you as map_options and filter_options and you didn't write a single method body. no cap. π
π DESCRIPTION π
so this module gives you a List attribute, right? and that List attribute comes with a bunch of list operations baked right in. it's giving "I brought snacks for the whole class" π
if you want the full deets on every operation it can hand you, go peek at MooseX::AttributeHelpers::MethodProvider::List β that's where the details live, iykyk.
π METHODS π
here's the little lineup of methods hanging out in this module:
metaβ the meta thing. iconic, mysterious, does meta stuff. β¨method_providerβ the method provider. it provides methods. slay. πhas_method_providerβ checks whether there's a method provider. the vibe check, basically. π«Άhelper_typeβ the helper type. the type of the helper. the helper of the type. πΈ
π₯ SUPPORT π₯
got bugs? (not me being buggy, the code being buggy π) you can submit them through the RT bug tracker:
https://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-AttributeHelpers
or you can email them straight to 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
and there's an irc channel too, for the real-time chatter, at #moose on irc.perl.org β aka irc://irc.perl.org/#moose π§
π AUTHOR π
Stevan Little <stevan@iinteractive.com> β the main character who wrote this. respect. π
π 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. π
okay that's the whole page, you made it to the end, I'm so proud of you π₯Ή this was perl v5.34.0, dated 2022-06-15, and that's the MooseX::AttributeHelpers::Trait::Collection::List(3pm) manual, wrapped up with a little bow π go forth and list your attributes, bestie π
π
π¦ 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