Say I have a file directory with hundreds of modules, I want to know if
there is a tool I can scan and identify the uninitalized variables in all
the files once (or through a loop) without actually running through all the
pages.
Harry
----- Original Message -----
From: "Tyler MacDonald" <[EMAIL PROTECTED]>
To: "Harry Zhu" <[EMAIL PROTECTED]>
Cc: "Frank Maas" <[EMAIL PROTECTED]>; <modperl@perl.apache.org>
Sent: Wednesday, February 22, 2006 5:27 PM
Subject: Re: find all uninitialized variables?
Harry Zhu <[EMAIL PROTECTED]> wrote:
"use strict" will find the undeclared/undefined variables.
something like
my $var;
and later on used in the program will not be find by the "use strict",
but
will cause "use uninitialized variables" warnings if -w switch is on.
If you really want to cause your scripts to crash on every
uninitialized variable so you have to go in and fix it, you can do this:
use warnings FATAL => 'uninitialized';
Cheers,
Tyler
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.0.0/266 - Release Date: 2/21/2006