Perl::Critic finds annoying little bugs in your code.

| No Comments

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.

Leave a comment

Job hunting for programmers


Land the Tech Job You Love, Andy Lester's guide to job hunting for programmers and other technical professionals, is available in PDF, ePub and .mobi formats, all DRM-free, as well as good old-fashioned paper.