You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Tom Christiansen <tc...@chthon.perl.com> on 2000/03/08 06:27:44 UTC

Re: uninitialized $@?

>----- Original Message -----
>From: "Bill Moseley" <mo...@hank.org>
>>     Use of uninitialized value at Test.pm line 2659
>> But 2659 is:
>>     if ( $@ ) {
>> I don't see how testing $@ would give that error.

>Hmm, it's late where I am, and I may be missing something... But mod_perl
>does cool stuff with variable scoping. (Sometimes not so cool). If nothing
>else is going wrong, maybe you just need to turn off the error by saying:
>if ( defined($@) ) {...

No, don't do that.  The built-in variables are not guaranteed to give
results with defined.  For example, that one always is. 

A boolean test can never give that warning.

--tom