Skip Menu |

This queue is for tickets about the File-Queue CPAN distribution.

Report information
The Basics
Id: 100132
Status: open
Priority: 0/
Queue: File-Queue

People
Owner: Nobody in particular
Requestors: venkibs.eng [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.01
Fixed in: (no value)



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 }
From: dify.ltd [...] gmail.com
I had the same problem (Perl 5.20.1). Fixed it by replacing lines 19 through 23 with: %params = map { lc($_) => $params{$_} } keys %params; Hopefully the module author will incorporate the fix and release a new version (with some tests :-))