> -----Original Message----- > From: Me [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 30, 2001 1:05 PM > To: Bob Showalter; 'Etienne Marcotte'; [EMAIL PROTECTED] > Subject: Re: $a = $b eq "" ? 1 : 0; > > > > > $allowed = $username eq 'admin' ? 1 : 0; > > > > > > $allowed = 1 if $username eq 'admin'; > > > > FWIW, that statement by itself has no relationship to mod_perl. > > Well, I think the point is that mod_perl doesn't reset the value > of variables between runs so the second line may not do what > the programmer intended in a mod perl environment. >
Gotcha. You are absolutely correct. My practice is *always* to use local() with such variables. That guarantees that you get a fresh copy with each request and releases the value at the end of each request. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]