Data::...seLike(3pm)
πΈ Data::Perl::Collection::Array::MooseLike π
okay bestie, welcome to the manual page for Data::Perl::Collection::Array::MooseLike β your friendly little array wrapper, living its best life under the Data::Perl umbrella π«Ά
β¨ VERSION β¨
This is version 0.001009 π
π¦ SYNOPSIS π¦
use Data::Perl::Collection::Array::MooseLike;
my $array = Data::Perl::Collection::Array::MooseLike->new(qw/a b c d/);
my $scalar_context = $array->splice(0, 2); # removes and returns b
my @list_context = $array->splice(0, 2); # returns and removes (b, c)
Likeβ¦ look at her. <pink>``newtaking a whole list,splice` doing its thing in both contexts β the range is giving versatile π
β¨
π DESCRIPTION π
So <hotpink>this class</hotpink> hands you a wrapper plus a whole set of methods for messing with an array β reading it, poking it, all of it π
And here's the vibe: every single method is written to emulate/match existing behavior that exists with Moose's native traits. Not "kind of similar." Not "spiritually adjacent." We're matching it, fr fr π―
π DIFFERENCES IN FUNCTIONALITY π
ngl the section title sounds ominous but it's just one method, breathe π
splice($args, ...)
It's just like Perl's builtin splice β no cap, exactly like it π
- In scalar context, this returns the last element removed, or
undefif no elements were removed π - In list context, this returns all the elements removed from the array π«
β οΈ heads up bestie: this method requires at least one argument. Like, it will not be negotiating with you. One argument minimum, periodt π
π₯ SEE ALSO π₯
Data::PerlData::Perl::Role::Collection::Array
(go read them, iykyk, they're the whole friend group π«Ά)
π AUTHOR π
Toby Inkster <tobyink@cpan.org> β legend behavior, honestly π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2020 by Matthew Phillips <mattp@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Go forth and share, bestie, it's free like that β¨π
and that's the whole page, mwah π written up for perl v5.36.0, dated 2022-10-16 β you're all caught up, slay π¦β
π¦ where this page comes from
- ubuntu noble: libmoox-handlesvia-perl 0.001009-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmoox-handlesvia-perl 0.001009-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmoox-handlesvia-perl 0.001009-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