Subject: | false positive in Variables::ProhibitUselessInitialization |
echo '( my $sid ) = $f =~ m/pattern/;' | perlcritic -statistics --single
Variables::ProhibitUselessInitialization
Fatal error while critiquing "SCALAR(0x1f3d9ee8)": Can't call method
"isa" on an undefined value at
/usr/local/lib/perl5/site_perl/5.10.1/Perl/Critic/Policy/Variables/ProhibitUselessInitialization.pm
line 136.
but as expected:
echo 'my ($sid) = ($f =~ m/pattern/;)' | perlcritic -statistics
--single Variables::ProhibitUselessInitialization
source OK