Hash::MostUtils::leach - base implementation of n_each without the Perl-version-specific bits
This module is included as part of the Hash::MostUtils library.
Hash::MostUtils exports two functions which this module provides: leach and n_each. See the documentation for those functions in Hash::MostUtils for a more thorough treatment of how to use them.
leach
n_each
leach (and n_each) both provide a splice-like interface for operating on an array. In Perl versions 5.12 and lower, the prototype for splice is:
splice
sub splice (\@;$$@) { ... }
However, in Perl versions 5.13 and above, the prototype for splice is:
sub splice (+;$$@) { ... }
By extension, the functions leach and n_each need to have a similar version-specific prototype on them.
This class serves as an interface to choose between the two prototypes based on your version of Perl.
(c) 2013 by Belden Lyman
This library is free software: you may redistribute it and/or modify it under the same terms as Perl itself; either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install Hash::MostUtils, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Hash::MostUtils
CPAN shell
perl -MCPAN -e shell install Hash::MostUtils
For more information on module installation, please visit the detailed CPAN module installation guide.