perl -MO=Lint

| No Comments | Bookmark and Share

It is generally accepted that when developing Perl, you should be using warnings (use warnings) and recommended that you go a step further with use strict, which forces the declaration of variables with my before they are used, among other things. Beyond these two, however, is the B::Lint module that performs further checks on your code. Using it couldn't be simpler; simply pass the option -MO=Lint,all to the Perl command when invoking your program. The -M option tells Perl that you want to use the module specified, and ',all' is an option passed to the Lint module, telling it to perform all checks, which is probably what you want. If you have some bad habit, or want it to specifically skip some checks, you can add that on to the argument list, prepending the option listed in the documentation with 'no-'.

Leave a comment

About this Entry

This page contains a single entry by Drew Stephens published on February 21, 2007 11:14 AM.

Better uses for your Sunday mornings was the previous entry in this blog.

Using sed is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 5.1