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

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

πŸ’… 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. πŸŽ€


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