List::M...tils::XS(3)
π List::MoreUtils::XS β the compiled bestie backend π
ok so real talk: this is the List::MoreUtils::XS page from the User Contributed Perl Documentation collection, and it's basically the turbo-charged compiled sidekick of List::MoreUtils. It doesn't want the spotlight, it just wants to make your list functions go fast β¨
πΈ NAME
List::MoreUtils::XS β Provide compiled List::MoreUtils functions π
Like, that's the whole vibe. Compiled versions of the functions you already know and love.
π¦ SYNOPSIS
ok watch this, bestie π
use List::MoreUtils::XS (); # doesn't export anything
use List::MoreUtils ':all'; # required to import functions
my @procs = get_process_stats->fetchall_array;
# sort by ppid, then pid
qsort { $a->[3] <=> $b->[3] or $a->[2] <=> $b->[2] } @procs;
while( @procs ) {
my $proc = shift @procs;
my @children = equal_range { $_->[3] <=> $proc->[2] } @procs;
}
my @left = qw(this is a test);
my @right = qw(this is also a test);
my %rlinfo = listcmp @left, @right;
# on unsorted
my $i = firstidx { $_ eq 'yeah' } @foo;
# on sorted - always first, but might not be 'yeah'
my $j = lower_bound { $_ cmp 'yeah' } @bar;
# on sorted - any of occurrences, is surely 'yeah'
my $k = bsearchidx { $_ cmp 'yeah' } @bar;
π¨ important vibe check: notice that use List::MoreUtils::XS (); exports nothing. Like, zero, nada. It's giving "I'm just here to do the work behind the scenes" energy π
If you actually want the functions to show up in your namespace, you gotta do use List::MoreUtils ':all'; β that's the non-negotiable part, fr fr.
Also peep the little comments in there, because they're actually doing a lot of heavy lifting:
firstidxis the one you use on unsorted datalower_boundis for sorted data β and it's always first, but it might not be'yeah'πbsearchidxis for sorted data too β it finds any of the occurrences, and it is surely'yeah'β
π§ DESCRIPTION
List::MoreUtils::XS is a backend for List::MoreUtils. That's it. That's the job. π
And yeah, technically it could be practically independent from List::MoreUtils β because sometimes users wish for things like that β but it technically depends on List::MoreUtils. Like, it's not escaping that relationship, sorry bestie π
β οΈ and here's the part you really need to hear: since it's only a backend, the API is not public and can change without any warning. No cap. No deprecation cycle, no heads-up text, no "hey bestie just so you know." So don't go building your whole personality on it, mkay? π
π SEE ALSO
List::UtilList::AllUtils
go give them a follow, they're iconic in their own right π
π AUTHOR
- Jens Rehsack
<rehsack AT cpan.org> - Adam Kennedy
<adamk@cpan.org> - Tassilo von Parseval
<tassilo.von.parseval@rwth-aachen.de>
the founding mothers (well, authors) of this whole situation π«Ά
π COPYRIGHT AND LICENSE
Some parts copyright 2011 Aaron Crane.
Copyright 2004 - 2010 by Tassilo von Parseval
Copyright 2013 - 2017 by Jens Rehsack
ok so the licensing lore is a lil split, pay attention πβ¨
All code added with 0.417 or later is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
All code until 0.416 is licensed under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.
π seriously though, the "AS IS" / "WITHOUT WARRANTIES" bit is not a joke β that's the actual legal wording and it means exactly what it says.
k that's the whole page, bestie π¦ this cutie was served up by perl v5.42.0, dated 2020-10-22, and it lives at List::M...tils::XS(3) in the manual β mwah πβ¨ go write some fast list code, ily π«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: perl-List-MoreUtils-XS 0.430-160000.2.2 Β· (Artistic-1.0 OR GPL-1.0-or-later) AND Apache-2.0
- opensuse-leap 16.0: perl-List-MoreUtils-XS 0.430-160000.2.2 Β· (Artistic-1.0 OR GPL-1.0-or-later) AND Apache-2.0
- opensuse-leap 16.0: perl-List-MoreUtils-XS 0.430-160000.2.2 Β· (Artistic-1.0 OR GPL-1.0-or-later) AND Apache-2.0
- opensuse-leap 16.0: perl-List-MoreUtils-XS 0.430-160000.2.2 Β· (Artistic-1.0 OR GPL-1.0-or-later) AND Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms