List::...sBy::XS(3pm)

πŸ“¦
version 0.06 Β· 5 versions
, in debian trixie, ubuntu resolute

πŸ’– 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_by
  • nsort_by
  • rev_sort_by
  • rev_nsort_by
  • max_by (alias nmax_by)
  • min_by (alias nmin_by)
  • uniq_by
  • partition_by
  • count_by
  • zip_by
  • unzip_by
  • extract_by
  • weighted_shuffle_by
  • bundle_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 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