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

Property Value
Distribution Mageia 5.1
Repository Mageia Core i586
Package name perl-Hash-SafeKeys
Package version 0.30.0
Package release 7.mga5
Package architecture i586
Package type rpm
Installed size 24.18 KB
Download size 21.41 KB
Official Mirror
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.30.0-7.mga5.x86_64.rpm 0.30.0 x86_64 Mageia Core
perl-Hash-SafeKeys - - -


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


Name Value
perl(Hash::SafeKeys) == 0.30.0
perl-Hash-SafeKeys == 0.30.0-7.mga5
perl-Hash-SafeKeys(x86-32) == 0.30.0-7.mga5


Type URL
Binary Package perl-Hash-SafeKeys-0.30.0-7.mga5.i586.rpm
Source Package perl-Hash-SafeKeys-0.30.0-7.mga5.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




2014-10-15 - umeabot <umeabot> 0.30.0-7.mga5
+ Revision: 743098
- Second Mageia 5 Mass Rebuild
2014-09-16 - umeabot <umeabot> 0.30.0-6.mga5
+ Revision: 685033
- Mageia 5 Mass Rebuild
2014-06-03 - pterjan <pterjan> 0.30.0-5.mga5
+ Revision: 631284
- Rebuild for perl 5.20
2013-10-19 - umeabot <umeabot> 0.30.0-4.mga4
+ Revision: 524343
- Mageia 4 Mass Rebuild
2013-05-29 - jquelin <jquelin> 0.30.0-3.mga4
+ Revision: 430748
- perl 5.18.0 rebuild
2013-01-13 - umeabot <umeabot> 0.30.0-2.mga3
+ Revision: 368408
- Mass Rebuild -
2012-12-13 - shlomif <shlomif> 0.30.0-1.mga3
+ Revision: 330225
- update to 0.03
2012-06-15 - shlomif <shlomif> 0.20.0-1.mga3
+ Revision: 260759
- imported package perl-Hash-SafeKeys
2012-06-15 - cpan2dist 0.02-1mga
- initial mageia release, generated with cpan2dist

See Also

Package Description
perl-Hash-Slice-0.30.0-5.mga5.noarch.rpm Make a hash from a deep slice of another hash
perl-Hash-Util-FieldHash-Compat-0.80.0-3.mga5.noarch.rpm Emulate Hash::Util::FieldHash using
perl-Heap-0.800.0-5.mga5.noarch.rpm Heap module for perl
perl-Heimdal-Kadm5-0.80.0-10.mga5.i586.rpm Perl extension for adminstration of Heimdal Kerberos servers
perl-Helios-2.810.0-3.mga5.noarch.rpm Helios service to index MP3s to a database table
perl-Hijk-0.130.0-4.mga5.noarch.rpm Specialized HTTP client
perl-Hook-LexWrap-0.240.0-5.mga5.noarch.rpm Lexically scoped subroutine wrappers
perl-Hook-Output-File-0.70.0-5.mga5.noarch.rpm Redirect STDOUT/STDERR to a file
perl-I18N-Charset-1.412.0-4.mga5.noarch.rpm IANA Character Set Registry names and Unicode::MapUTF8
perl-IMAP-Admin-1.6.7-5.mga5.noarch.rpm IMAP-Admin Perl module
perl-IMDB-Film-0.530.0-5.mga5.noarch.rpm OO Perl interface to the database of films IMDB
perl-IO-AIO-4.310.0-5.mga5.i586.rpm Asynchronous Input/Output
perl-IO-All-0.790.0-3.mga5.noarch.rpm Magic all-in-one IO class
perl-IO-Async-0.630.0-4.mga5.noarch.rpm A Loop using an C<IO::Poll> object
perl-IO-BufferedSelect-1.0.0-5.mga5.noarch.rpm Line-buffered select interface