perl-Hash-SafeKeys - Get hash contents without resetting each iterator

Property Value
Distribution Mageia Cauldron
Repository Mageia Core x86_64
Package filename perl-Hash-SafeKeys-0.40.0-6.mga8.x86_64.rpm
Package name perl-Hash-SafeKeys
Package version 0.40.0
Package release 6.mga8
Package architecture x86_64
Package type rpm
Category Development/Perl
License GPL+ or Artistic
Maintainer -
Download size 21.58 KB
Installed size 33.02 KB
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:
while (my($k,$v) = each %hash) {
@k = sort keys %hash;               # Infinite loop!
@v = grep { /foo/ }, values %hash;  # Ack!
print join ' ', %hash;              # Run away!
'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:


Package Version Architecture Repository
perl-Hash-SafeKeys-0.40.0-6.mga8.i586.rpm 0.40.0 i586 Mageia Core
perl-Hash-SafeKeys - - -


Name Value - - -
perl(DynaLoader) -
perl(Exporter) -
perl(Test::More) -
perl(base) -
perl(strict) -
perl(warnings) -
perl-base >= 2:5.30.0


Name Value
perl(Hash::SafeKeys) == 0.40.0
perl-Hash-SafeKeys == 0.40.0-6.mga8
perl-Hash-SafeKeys(x86-64) == 0.40.0-6.mga8


Type URL
Binary Package perl-Hash-SafeKeys-0.40.0-6.mga8.x86_64.rpm
Source Package perl-Hash-SafeKeys-0.40.0-6.mga8.src.rpm

Install Howto

  1. Enable Mageia Core repository on Install and Remove Software
  2. Update packages list:
    # urpmi.update -a
  3. Install perl-Hash-SafeKeys rpm package:
    # urpmi perl-Hash-SafeKeys




2019-08-27 - tv <tv> 0.40.0-6.mga8
+ Revision: 1433090
- rebuild with perl-5.30
2018-09-21 - umeabot <umeabot> 0.40.0-5.mga7
+ Revision: 1293191
- Mageia 7 Mass Rebuild
2018-08-08 - pterjan <pterjan> 0.40.0-4.mga7
+ Revision: 1249486
- Rebuild for perl 5.28
2017-10-02 - tv <tv> 0.40.0-3.mga7
+ Revision: 1164753
- rebuild with fixed rpm for missing autodeps
2017-08-31 - pterjan <pterjan> 0.40.0-2.mga7
+ Revision: 1148947
- Rebuild for perl ABI changes

See Also

Package Description
perl-Hash-Slice-0.30.0-10.mga7.noarch.rpm Make a hash from a deep slice of another hash
perl-Hash-Util-FieldHash-Compat-0.110.0-2.mga7.noarch.rpm Emulate Hash::Util::FieldHash using
perl-Heap-0.800.0-8.mga7.noarch.rpm Heap module for perl
perl-Heimdal-Kadm5-0.80.0-20.mga8.x86_64.rpm Perl extension for adminstration of Heimdal Kerberos servers
perl-Helios-2.830.0-4.mga7.noarch.rpm Helios service to index MP3s to a database table
perl-Hijk-0.280.0-1.mga7.noarch.rpm Specialized HTTP client
perl-Hook-LexWrap-0.260.0-2.mga7.noarch.rpm Lexically scoped subroutine wrappers
perl-Hook-Output-File-0.80.0-2.mga7.noarch.rpm Redirect STDOUT/STDERR to a file
perl-I18N-Charset-1.418.0-1.mga7.noarch.rpm IANA Character Set Registry names and Unicode::MapUTF8
perl-IMAP-Admin-1.6.8-3.mga7.noarch.rpm IMAP-Admin Perl module
perl-IMDB-Film-0.530.0-8.mga7.noarch.rpm OO Perl interface to the database of films IMDB
perl-IO-AIO-4.720.0-3.mga8.x86_64.rpm Asynchronous Input/Output
perl-IO-All-0.870.0-2.mga7.noarch.rpm Magic all-in-one IO class
perl-IO-Async-0.740.0-1.mga8.noarch.rpm A Loop using an C<IO::Poll> object
perl-IO-BufferedSelect-1.0.0-8.mga7.noarch.rpm Line-buffered select interface