Subject: | '&' in Text-German-Endung should probably be '&&' |
A couple of days ago I was installing Text::Compare on two different OSes today.
Text::Compare uses some non-core CPAN modules, one of which uses
Text::German::Endung. I got the following warning while running 'make test':
t/00-load....ok 1/1# Testing Text::Compare 0.01, Perl 5.008004, /usr/bin/perl
t/00-load....ok
t/01-func....ok 1/5Use of uninitialized value in bitwise and (&) at /usr/local/lib/perl5/
site_perl/5.8.8/Text/German/Endung.pm line 52.
Use of uninitialized value in bitwise and (&) at /usr/local/lib/perl5/site_perl/5.8.8/Text/
German/Endung.pm line 52.
Use of uninitialized value in bitwise and (&) at /usr/local/lib/perl5/site_perl/5.8.8/Text/
German/Endung.pm line 52.
Use of uninitialized value in bitwise and (&) at /usr/local/lib/perl5/site_perl/5.8.8/Text/
German/Endung.pm line 52.
Use of uninitialized value in bitwise and (&) at /usr/local/lib/perl5/site_perl/5.8.8/Text/
German/Endung.pm line 52.
Use of uninitialized value in bitwise and (&) at /usr/local/lib/perl5/site_perl/5.8.8/Text/
German/Endung.pm line 52.
Use of uninitialized value in bitwise and (&) at /usr/local/lib/perl5/site_perl/5.8.8/Text/
German/Endung.pm line 52.
Use of uninitialized value in bitwise and (&) at /usr/local/lib/perl5/site_perl/5.8.8/Text/
German/Endung.pm line 52.
t/01-func....ok
Here is the relevant section of Text::German::Endung:
sub max_endung {
my $word = shift;
my $class = wordclass($word);
my $result = undef;
for $i (1 .. length($word)) {
my $endung = substr($word, length($word)-$i,$i);
if (defined $ENDUNG{$endung}
and ($ENDUNG{$endung}->[1] & $class)) { # <------- line 52
$result = $endung
if !defined($result) || length($endung) > length($result);
}
}
$result;
}
Did you mean to say '&&' rather than '&'? That's what the context would seem to suggest.
Jim Keenan