Skip Menu |

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

Report information
The Basics
Id: 40125
Status: resolved
Priority: 0/
Queue: Text-Phonetic

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

Bug Information
Severity: Normal
Broken in: 1.06
Fixed in: (no value)



Text::Phonetic::Koeln produces a ton of warnings when given an empty string or a "C". They look like this: Use of uninitialized value $string in string eq at C:/strawberry/perl/site/lib/T ext/Phonetic.pm line 132. Use of uninitialized value $string in string eq at C:/strawberry/perl/site/lib/T ext/Phonetic.pm line 132. Use of uninitialized value $string in string eq at C:/strawberry/perl/site/lib/T ext/Phonetic.pm line 132. Use of uninitialized value $string in string eq at C:/strawberry/perl/site/lib/T ext/Phonetic.pm line 132. Use of uninitialized value $string in string eq at C:/strawberry/perl/site/lib/T ext/Phonetic.pm line 132. Use of uninitialized value $string in string eq at C:/strawberry/perl/site/lib/T ext/Phonetic.pm line 132. Use of uninitialized value $string in string eq at C:/strawberry/perl/site/lib/T ext/Phonetic.pm line 132. Use of uninitialized value $character_list[0] in string eq at C:/strawberry/perl /site/lib/Text/Phonetic/Koeln.pm line 39. Since i try to work with about 180,000 records this can get pretty annoying. I fixed this for me by inserting a line in Phonetic.pm so the sub _is_inlist looks like this now: # ---------------------------------------------------------------- sub _is_inlist # ---------------------------------------------------------------- { my $string = shift; return 0 unless defined $string; my $list = (scalar @_ == 1 && ref($_[0]) eq 'ARRAY') ? shift : \@_; return 1 if grep {$string eq $_ } @$list; return 0; } Also i've altered line 42 in Koeln.pm into this: } elsif ($character_list[0] and $character_list[0] eq 'C') { Now all warnings seem to be gone.
Fixed om 1.07