Belden Lyman > Hash-MostUtils > Hash::MostUtils::leach


Annotate this POD


View/Report Bugs


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 (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:

    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.

syntax highlighting: