Name : perl-Data-Eacherator
| |
Version : 0.01
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 8.71
| Date : 2024-08-05 18:10:44
|
Group : Development/Libraries/Perl
| Source RPM : perl-Data-Eacherator-0.01-8.71.src.rpm
|
Size : 0.00 MB
| |
Packager : (none)
| |
Summary : simple each-like iterator generator for hashes and arrays
|
Description :
This module is designed as a simple drop-in replacement for \"each\" on those occasions when you need to iterate over a hash _or_ an array.
That is, if \'$data\' is a hash, and you\'re happily doing something like:
while (my ($k, $v) = each %$data) { }
but then decide that you also want to loop over \'$data\' in the event that it\'s an array, you can do:
my $iter = eacherator($data);
while (my ($k, $v) = $iter->()) { }
(You may wish to use this package if, for example, you have a module that happily iterates over a hash, but then discover that you also need to iterate over an \"ordered\" hash--in this case you can just switch curly brackets to square brackets and use \'eacherator()\' to generate a drop-in replacement for each.)
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-D/openSUSE_Tumbleweed/noarch |