List::UtilsBy::XS - XS implementation of List::UtilsBy
use List::UtilsBy::XS qw(sort_by); sort_by { $_->{foo} } @hash_ref_list
You can use those functions same as List::UtilsBy ones, but some functions have limitation. See LIMITATION section.
List::UtilsBy::XS is XS implementation of List::UtilsBy. Functions are more fast than original ones.
Same as List::UtilsBy
List::UtilsBy::XS implements following functions.
Some functions are implemented by lightweight callback API. 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 some features.
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
Limitations are:
$_
List::UtilsBy localizes $_ in the code block, but List::UtilsBy::XS doesn't localize it and it is only alias same as map, grep. So you should not modify $_ in callback subroutine.
map
grep
@_
You can access argument as only $_ and cannot access as @_, $_[n].
$_[n]
Syohei YOSHIDA <syohex@gmail.com>
Copyright 2013- Syohei YOSHIDA
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
List::UtilsBy
To install List::UtilsBy::XS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm List::UtilsBy::XS
CPAN shell
perl -MCPAN -e shell install List::UtilsBy::XS
For more information on module installation, please visit the detailed CPAN module installation guide.