B::Lint

Description

B::Lint module contains Perl lint. SYNOPSIS perl -MO=Lint[,OPTIONS] foo.pl The B::Lint module is equivalent to an extended version of the -w option of perl. It is named after the program lint which carries out a similar process for C programs. OPTIONS AND LINT CHECKS Option words are separated by commas (not whitespace) and follow the usual conventions of compiler backend options. Following any options (indicated by a leading -) come lint check arguments. Each such argument (apart from the special all and none options) is a word representing one possible lint check (turning on that check) or is no-foo (turning off that check). Before processing the check arguments, a standard list of checks is turned on. Later options override earlier ones. Available options are: magic-diamond Produces a warning whenever the magic <> readline is used. Internally it uses perls two-argument open which itself treats filenames with special characters specially. This could allow interestingly named files to have unexpected effects when reading. % touch rm *| % perl -pe 1 The above creates a file named rm *|. When perl opens it with <> it actually executes the shell program rm *. This makes <> dangerous to use carelessly. context Produces a warning whenever an array is used in an implicit scalar context. For example, both of the lines $foo = length(@bar); $foo = @bar; will elicit a warning. Using an explicit scalar() silences the warning. For example, $foo = scalar(@bar); implicit-read and implicit-write These options produce a warning whenever an operation implicitly reads or (respectively) writes to one of Perls special variables. For example, implicit-read will warn about these: /foo/; and implicit-write will warn about these: s/foo/bar/; Both implicit-read and implicit-write warn about this: for (@a) { ... } bare-subs This option warns whenever a bareword is implicitly quoted, but is also the name of a subroutine in the current package. Typical mistakes that it will trap are: use constant foo => bar; @a = ( foo => 1 ); $b{foo} = 2; Neither of these will do what a naive user would expect. dollar-underscore This option warns whenever $_ is used either explicitly anywhere or as the implicit argument of a print statement. private-names This option warns on each use of any variable, subroutine or method name that lives in a non-current package but begins with an underscore ("_"). Warnings arent issued for the special case of the single character name "_" by itself (e.g. $_ and @_). undefined-subs This option warns whenever an undefined subroutine is invoked. This option will only catch explicitly invoked subroutines such as foo() and not indirect invocations such as &$subref() or $obj->meth(). Note that some programs or modules delay definition of subs until runtime by means of the AUTOLOAD mechanism. regexp-variables This option warns whenever one of the regexp variables $`, $& or $ is used. Any occurrence of any of these variables in your program can slow your whole program down. See perlre for details. all Turn all warnings on. none Turn all warnings off..

Blint - Contains Perl - Perl - Option - Whenever - Foo - Options - Lint - Libraries - Programming

Published By:Malcolm Beattie

License Type:Freeware

Date Added:25 October, 2010

Version:1.09

Price:Free

Downloads:85

Size:17.4 KB

Platform: Linux

What people say
- required fields
     
Related Downloads

Doc::Perlish is a Perl module that contains Perl Documentation Tools. SYNOPSIS my $doc = Doc::Perlish->new( type => "POD", input => "source.

DateOct 9, 2010

AuthorBrian Ingerson and Sam Vilain

Size56.3 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

Statistics::Cluto package contains Perl binding for CLUTO.

DateSep 4, 2010

AuthorIkuhiro IHARA

Size27.6 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

perlfilter package contains Perl source filters. This article is about a little-known feature of Perl called source filters.

DateOct 4, 2010

AuthorPaul Marquess

Size12.2 MB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

perlrecharclass package contains Perl regular expression character classes. The top level documentation about Perl regular expressions is found in perlre.

DateSep 9, 2010

AuthorPerl Team

Size14.8 MB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

Speech::Recognizer::ViaVoice contains Perl wrappers for IBMs ViaVoice speech Recognizer library.

DateNov 1, 2010

AuthorRichard Kilgore

Size8.2 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming