I hope Perl::Critic will save us from the C-style programmers. I frequently come across some module or program that spends dozens of lines needlessly predeclaring variables. I wish there was a policy for detecting that.
The closest I've found is Perl::Critic::Policy::Variables::ProhibitUselessInitialization.
I frequently come across some module or program that spends dozens of lines needlessly predeclaring variables.
Got an example? By what criteria is it needless?
Code evolves sometimes, sometimes defaults change, what you end up is with a lot of predeclaring, none of it is needless.