in reply to Re^5: Announcing Perl-Critic-0.14
in thread Announcing Perl-Critic-0.14
It's not about the assignment. It's that my() should never be conditional. my $foo if $bar is just as bad for the same reason. You're just not likely to write that because it looks funny. my $foo ... for ... is probably also just as bad. The statement modifier form allows the my() to declare the variable for use by all following statements in that scope.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
|
|---|