List::...sBy::XS(3pm)
π List::UtilsBy::XS β the manual page, but make it make sense π
okay bestie, so this is the page for List::...sBy::XS(3pm), straight out of the User Contributed Perl Documentation. buckle up, it's short but it's important. π
β¨ NAME β¨
List::UtilsBy::XS β it's the XS implementation of List::UtilsBy. same energy, but compiled. π
πΈ SYNOPSIS πΈ
use List::UtilsBy::XS qw(sort_by);
sort_by { $_->{foo} } @hash_ref_list
so you can use these functions same as the List::UtilsBy ones, but some functions have limitation. π go read the LIMITATION section, fr fr, don't skip it.
π¦ DESCRIPTION π¦
List::UtilsBy::XS is an XS implementation of List::UtilsBy. Functions are more fast than the original ones. no cap. π₯
π FUNCTIONS π
Same as List::UtilsBy. π«
List::UtilsBy::XS implements the following functions:
sort_bynsort_byrev_sort_byrev_nsort_bymax_by(aliasnmax_by)min_by(aliasnmin_by)uniq_bypartition_bycount_byzip_byunzip_byextract_byweighted_shuffle_bybundle_by
π LIMITATIONS π
Some functions are implemented by a lightweight callback API. These ones right here:
sort_by, rev_sort_by, nsort_by, rev_nsort_by, min_by, max_by, nmin_by, nmax_by, uniq_by, partion_by, count_by, extract_by, weighted_shuffle_by
...are limited in some features. π
Limitations are:
π Don't change argument $_ in code block
List::UtilsBy localizes $_ in the code block, but List::UtilsBy::XS doesn't localize it and it's only an alias, same as map and grep.
so like... do NOT modify $_ in your callback subroutine, bestie. just don't. π
ββοΈ
π¬ Can't access to arguments as @_ in code block
You can access the argument as only $_, and you cannot access it as @_ or $_[n]. that's the rule. periodt.
π«Ά AUTHOR π«Ά
Syohei YOSHIDA <syohex@gmail.com> β iconic behavior honestly. β¨
π COPYRIGHT π
Copyright 2013- Syohei YOSHIDA
π LICENSE π
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π
π§ SEE ALSO π§
List::UtilsBy
okay that's the whole page, you ate it, I'm so proud of you π₯Ήπ
and here's the cute sign-off: this was the List::...sBy::XS(3pm) page as shipped with perl v5.40.1, dated 2025-04-15. go forth and sort_by responsibly, bestie. ππ¦π
π¦ where this page comes from
- debian trixie: liblist-utilsby-xs-perl 0.06-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: liblist-utilsby-xs-perl 0.06-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