Subject: | Use of each() on hash after insertion without resetting hash iterator |
Hi,
The File::Queue Module throws the following error on Perl-5.20.0. I can confirm that it works fine on Perl-5.16.2. I don't have any other Perl versions installed, so i cant confirm the behavior on other versions.
Here are the specific details:
username@hostname:~ # uname -a
Linux hostname 3.0.13-0.27-default #1 SMP Wed Feb 15 13:33:49 UTC 2012 (d73692b) x86_64 unknown unknown GNU/Linux
username@hostname:~ #
username@hostname:~ # /versions/perl-5.16.2/bin/perl -MFile::Queue -e 'use File::Queue; use strict; my $q=File::Queue->new(File=>"/tmp/queue_5162");print "$File::Queue::VERSION\n"'
1.01
username@hostname:~ # /versions/perl-5.20.0/bin/perl -MFile::Queue -e 'use File::Queue; use strict; my $q=File::Queue->new(File=>"/tmp/queue_520");print "$File::Queue::VERSION\n"'
Use of each() on hash after insertion without resetting hash iterator results in undefined behavior at /versions/perl-5.20.0/lib/perl5/site_perl/5.20.0/File/Queue.pm line 19.
Use of each() on hash after insertion without resetting hash iterator results in undefined behavior at /versions/perl-5.20.0/lib/perl5/site_perl/5.20.0/File/Queue.pm line 19.
1.01
username@hostname:~ #
For me it looks like line 21 is failing on 5.20.
18 # convert to lower case
19 while( my($key, $val) = each %params)
20 {
21 delete $params{$key};
22 $params{ lc($key) } = $val;
23 }