Skip Menu |

This queue is for tickets about the Tie-RegexpHash CPAN distribution.

Report information
The Basics
Id: 1851
Status: resolved
Priority: 0/
Queue: Tie-RegexpHash

People
Owner: Nobody in particular
Requestors: rrwo [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.10
Fixed in: 0.12



Subject: Bug in testing for keys
Reported by Bart Vetters <robartes@nirya.be>, Oct. 10, 2002 in E-mail: some people have found a bug in the Tie::RegexpHash.pm module. The discussion is at http://www.perlmonks.org/index.pl?node_id=204227. The bug is at lines 58 and 59 in version 0.10. Because you access $self->{KEYS}->[ $i ] before you test that $i < $self->count, you run over the end of the array referenced in $self->{KEYS}. The simplest solution, as jsprat indicates in the discussion, is to switch the order in which the two tests are taken. Thanks for a great module!