devel/p5-Hash-SafeKeys 0.04nb3 NetBSD
Perl5 module to get hash contents without resetting each iterator
- System
- NetBSD
- Repository
- pkgsrc
- Maintainer
- [email protected]
- Last update
- Commit
618415630a- License
- gnu-gpl-v2 OR artistic
- Categories
- devel, perl5
- Package size
- 12.4 KiB, 33.9 KiB installed
Description
Every hash variable in Perl has its own internal iterator, accessed by the builtin each, keys, and values functions. The iterator is also implicitly used whenever the hash is evaluated in list context. The iterator is "reset" whenever keys or values is called on a hash, including the implicit calls when the hash is evaluated in list context. That makes it dangerous to do certain hash operations inside a while ... each loop.
Hash::SafeKeys provides alternate functions to access the keys, values, or entire contents of a hash in a way that does not reset the iterator, making them safe to use in such contexts.
Install
Binary package:
pkgin install p5-Hash-SafeKeys
From pkgsrc:
cd /usr/pkgsrc/devel/p5-Hash-SafeKeys && make install clean
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | Version |
|---|---|
| NetBSD 10.1 x86_64 | 0.04nb3 |
| NetBSD 10.1 aarch64 | 0.04nb2 |
| SmartOS / illumos x86_64 | 0.04nb3 |
| macOS 15 arm64 | 0.04nb3 |