Skip Menu |

This queue is for tickets about the Text-Levenshtein CPAN distribution.

Report information
The Basics
Id: 13873
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Text-Levenshtein

People
Owner: JGOLDBERG [...] cpan.org
Requestors: chris [...] ex-parrot.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.05
Fixed in: (no value)



Subject: numerous 'substr outside of string' warnings from Text::Levenshtein::distance
e.g.: $ perl5.8.5 -MText::Levenshtein -w -e 'print Text::Levenshtein::distance("fish", "octopus"), "\n";' substr outside of string at /usr/lib/perl5/site_perl/5.8.5/Text/Levenshtein.pm line 49. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.8.5/Text/Levenshtein.pm line 49. substr outside of string at /usr/lib/perl5/site_perl/5.8.5/Text/Levenshtein.pm line 49. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5.8.5/Text/Levenshtein.pm line 49. 7 This only occurs for distances between strings of different lengths. What's going on is that the loop at line 49 is tring to consider prefixes of the string which are too long, but I haven't looked at whether fixing it not to is as simple as changing the limit on the for loop. Text::LevenshteinXS seems not to have this problem.
fixed in 0.06_01