perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sergeant <m...@sergeant.org>
Subject Re: Is variable initialization necessary?
Date Mon, 10 Jul 2000 18:19:56 GMT
On Mon, 10 Jul 2000, Drew Taylor wrote:

> Here's another topic I've had on my mind lately.
> 
> I currently try to initialize all vaiables in the definition (my $var =
> ();) I've read where several I respect, Doug being one :-), initialize
> variables. Then I've read posts of people comparing the op count from
> initializtion vs. non-initialization where initialization creates a
> sizable more percentage of calls.
> 
> So my question is: Is variable initialization necessary? Is being a
> lexical enough? To date, I've played it safe. But if I don't have to...
> then I won't.
> 
> Does anyone have good evidence either way?

I doubt you'll find evidence, just some hand waving. If you know what
you're doing, use lexicals and don't worry about initialization. If you
don't know what you're doing, initialize.

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org


Mime
View raw message