MooseX...::Array(3pm)
๐ MooseX::AttributeHelpers::MethodProvider::Array โ but make it a group chat ๐
okay bestie, so this is a page from the User Contributed Perl Documentation, and the star of the show is MooseX::AttributeHelpers::MethodProvider::Array. yes that's a whole mouthful, we're gonna call it "the Array method provider" and move on with our lives ๐
โจ NAME โจ
MooseX::AttributeHelpers::MethodProvider::Array โ it's the method generator for MooseX::AttributeHelpers::Collection::Array. that's literally its whole job and it does it beautifully, no cap ๐
๐ธ VERSION ๐ธ
version 0.25 โ that's the one, that's the vibe check we're passing โ
๐ฆ DESCRIPTION ๐ฆ
so this is a role, right? and what a role does is hand you all the method generators for MooseX::AttributeHelpers::Collection::Array. that's it. that's the tea. it generates methods, you use methods, everyone's happy ๐
๐ METHODS ๐
metaโ yes queen, themetamethod is here, iconic as always
๐ PROVIDED METHODS ๐
lowkey the most important part. so listen โ this module also consumes the List method providers, and if you wanna peek at those provided methods you gotta go read that documentation. we're not repeating them here, go look, i believe in you ๐ซถ
here's the lineup of methods it hands you:
getpoppushsetshiftunshiftcleardeleteinsertsplicesort_in_placeaccessor
and now the two that need actual sentences, because they have โจloreโจ:
sort_in_placeโ sorts the array in place, meaning it actually modifies the value of the attribute. not a copy. the real one. the main character ๐
you can hand it an optional subroutine reference to sort with, exactly like you would with the core sort function. but โ and this is the plot twist โ instead of using $a and $b, you're gonna need to use $_[0] and $_[1] instead. write that down. tattoo it. whatever works bestie ๐ญ
accessorโ this one's a two-for-one deal:- pass it one argument โ it returns the value of the requested element
- pass it two arguments โ it sets the value of the requested element
one arg, you're reading. two args, you're writing. simple as ๐ง
๐ซถ SUPPORT ๐ซถ
got bugs? bestie, we've all got bugs. submit 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, 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 just talk about it, there's an irc channel for users of this distribution: #moose on irc.perl.org โ that's <irc://irc.perl.org/#moose> ๐ฌ come say hi, we don't bite
๐ AUTHOR ๐
Stevan Little <stevan@iinteractive.com> โ the legend themselves ๐
๐ 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. free as in go wild, just respect the terms bestie ๐
and that's the whole page, fr fr ๐ this was generated from the User Contributed Perl Documentation for MooseX...::Array(3pm), running on perl v5.34.0, dated 2022-06-15. slay, go write some attribute helpers, i'm obsessed with you ๐
โจ
๐ฆ 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