Hash::M...::leach(3)
πΈ NAME πΈ
Okay bestie, this is the Hash::M...::leach(3) page from the User Contributed Perl Documentation, and it's all about Hash::MostUtils::leach β the base implementation of n_each without the Perl-version-specific bits. Periodt. π
β¨ DESCRIPTION β¨
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. iykyk.
leach (and n_each) both provide a splice-like interface for operating on an array. Lowkey iconic.
In Perl versions 5.12 and lower, the prototype for splice is:
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. Not me explaining version drama, but yes. π
This class serves as an interface to choose between the two prototypes based on your version of Perl. Main character energy: it literally picks the right one so you don't have to. β¨
π COPYRIGHT AND LICENSE π
(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.
perl v5.42.2 Β· 2023-11-29 Β· Hash::M...::leach(3) β mwah, go slay your arrays bestie π
π¦ where this page comes from
- alpine 3.24: perl-hash-mostutils-doc 1.07-r4 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms