|
This post originated from an RSS feed registered with Perl Buzz
by Andy Lester.
|
Original Post: Perl::Critic finds annoying little bugs in your code.
Feed Title: Perlbuzz
Feed URL: http://perlbuzz.com/atom.xml
Feed Description: What's happening in the world of Perl programming, including Perl 5, Perl 6, the CPAN and Parrot?
|
Latest Perl Buzz Posts
Latest Perl Buzz Posts by Andy Lester
Latest Posts From Perlbuzz
|
|
My work colleague Mike O'Regan created a policy for the latest version of Perl::Critic.
Now if you have a line of code like this:
my $n += somefunc();
# Should be my $n = somefunc();
Perl::Critic will tell you
Augmented assignment operator '+=' used in declaration at line X,
column Y. Use simple assignment when initializing variables.
If you haven't let Perl::Critic loose on your code yet, now's a great time to try.
To the loyal Perl::Critic users, what's the nastiest bug Perl::Critic found for you? Let me know in the comments.
Read: Perl::Critic finds annoying little bugs in your code.