gugod/App-perlbrew — Issue #155: Test spams me with warnings when using perl 5.14.2
Author: juster
Created: 2011-10-22 01:44:11+00:00
State: open

This is trivial and maybe a waste of time to write this but when I run perlbrew's tests with 'make test', the 09.exit_status.t test spams the heck out of me. The warnings all come from the Text::Levenshtein module's fastdistance sub. Warnings are turned on globally somewhere (I'm guessing) and so, Text::Levenshtein starts printing warnings for its sloppy use of substr. However, this does _not_ happen ...

* with perl 5.12.2 on another computer.
* when using the 'prove' command.
* when simply running the 09.exit_status.t file with perl.

By running 'make -k' I was able to make sure I used the same command that 'make test' uses and here it is:

[juster@artemis App-perlbrew-0.30]$ perl -MExtUtils::Command::MM -e "test_harness(1, 'blib/lib', 'blib/arch')" t/09.exit_status.t 2>&1 | head -n 60
substr outside of string at /usr/share/perl5/vendor_perl/Text/Levenshtein.pm line 84.
Use of uninitialized value in string eq at /usr/share/perl5/vendor_perl/Text/Levenshtein.pm line 84.
substr outside of string at /usr/share/perl5/vendor_perl/Text/Levenshtein.pm line 88.
Use of uninitialized value in string eq at /usr/share/perl5/vendor_perl/Text/Levenshtein.pm line 88.
substr outside of string at /usr/share/perl5/vendor_perl/Text/Levenshtein.pm line 88.
... repeat 100 times or something ...

Here is the offensive code on metacpan: https://metacpan.org/source/JGOLDBERG/Text-Levenshtein-0.05/Levenshtein.pm#L70

I will keep trying to figure out how the heck warnings are turned on. I spent about two hours and gave up. Anyways this really annoys me and I was wondering if other people had the same problem and/or knew how to fix it.

Thanks,
Justin