Subject: | Uninitialized Warning |
This is originally from: https://github.com/Perl-Critic/Perl-Critic/issues/620
---
I get a warning
Use of uninitialized value in string eq at /usr/share/perl5/Perl/Critic/Policy/ValuesAndExpressions/ConstantBeforeLt.pm line 114.
I have found a minimal test case for this. The minimal input file is not valid Perl code; however, I did see the warning also on input files which were valid Perl. I suggest that perlcritic should not produce the warning even on syntactically badly-formed input.
Here's the minimal test case:
sub y {
Running this through perlcritic --brutal gives the above warning, among other messages.