.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "List::UtilsBy::XS 3pm" .TH List::UtilsBy::XS 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME List::UtilsBy::XS \- XS implementation of List::UtilsBy .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use List::UtilsBy::XS qw(sort_by); \& \& sort_by { $_\->{foo} } @hash_ref_list .Ve .PP You can use those functions same as List::UtilsBy ones, but some functions have limitation. See LIMITATION section. .SH DESCRIPTION .IX Header "DESCRIPTION" List::UtilsBy::XS is XS implementation of List::UtilsBy. Functions are more fast than original ones. .SH FUNCTIONS .IX Header "FUNCTIONS" Same as List::UtilsBy .PP List::UtilsBy::XS implements following functions. .IP sort_by 4 .IX Item "sort_by" .PD 0 .IP nsort_by 4 .IX Item "nsort_by" .IP rev_sort_by 4 .IX Item "rev_sort_by" .IP rev_nsort_by 4 .IX Item "rev_nsort_by" .IP "max_by (alias nmax_by)" 4 .IX Item "max_by (alias nmax_by)" .IP "min_by (alias nmin_by)" 4 .IX Item "min_by (alias nmin_by)" .IP uniq_by 4 .IX Item "uniq_by" .IP partition_by 4 .IX Item "partition_by" .IP count_by 4 .IX Item "count_by" .IP zip_by 4 .IX Item "zip_by" .IP unzip_by 4 .IX Item "unzip_by" .IP extract_by 4 .IX Item "extract_by" .IP weighted_shuffle_by 4 .IX Item "weighted_shuffle_by" .IP bundle_by 4 .IX Item "bundle_by" .PD .SH LIMITATIONS .IX Header "LIMITATIONS" Some functions are implemented by lightweight callback API. \&\f(CW\*(C`sort_by\*(C'\fR, \f(CW\*(C`rev_sort_by\*(C'\fR, \f(CW\*(C`nsort_by\*(C'\fR, \f(CW\*(C`rev_nsort_by\*(C'\fR, \&\f(CW\*(C`min_by\*(C'\fR, \f(CW\*(C`max_by\*(C'\fR, \f(CW\*(C`nmin_by\*(C'\fR, \f(CW\*(C`nmax_by\*(C'\fR, \f(CW\*(C`uniq_by\*(C'\fR, \f(CW\*(C`partion_by\*(C'\fR, \&\f(CW\*(C`count_by\*(C'\fR, \f(CW\*(C`extract_by\*(C'\fR, \f(CW\*(C`weighted_shuffle_by\*(C'\fR are limited some features. .PP Limitations are: .ie n .SS "Don't change argument $_ in code block" .el .SS "Don't change argument \f(CW$_\fP in code block" .IX Subsection "Don't change argument $_ in code block" List::UtilsBy localizes \f(CW$_\fR in the code block, but List::UtilsBy::XS doesn't localize it and it is only alias same as \f(CW\*(C`map\*(C'\fR, \f(CW\*(C`grep\*(C'\fR. So you should not modify \f(CW$_\fR in callback subroutine. .ie n .SS "Can't access to arguments as @_ in code block" .el .SS "Can't access to arguments as \f(CW@_\fP in code block" .IX Subsection "Can't access to arguments as @_ in code block" You can access argument as only \f(CW$_\fR and cannot access as \f(CW@_\fR, \&\f(CW$_[n]\fR. .SH AUTHOR .IX Header "AUTHOR" Syohei YOSHIDA .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright 2013\- Syohei YOSHIDA .SH LICENSE .IX Header "LICENSE" This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" List::UtilsBy