> -----Original Message-----
> From: Matt C. [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, December 08, 2001 2:07 PM
> To: Agustin Rivera; [EMAIL PROTECTED]
> Subject: Re: Disable ModPerl
> 
> 
> I believe the 'use vars' pragma actually sets up GLOBALS, 
> which very well could be
> your problem. Scope them locally with 'my', which will keep 
> them from getting
> re-used with previous values on consecutive hits. Someone 
> please correct me if I'm
> wrong about the use vars bit...regardless, scope them with 
> 'my' for sure.

You can't use file-scoped lexicals with Apache::Registry,
because your script is wrapped in a sub which is then
eval'd, so your lexcials are no longer file-scoped.

(Actually, you *can* use file-wide lexicals, but you cannot
refer to them from sub's in your program, which is typically
the whole point of the file-wide lexical in the first place.)

Using "our" (or "use vars") combined with "local" does the
trick nicely.

You can use file-scoped lexicals with Apache::PerlRun, because
it doesn't wrap your script in a sub.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to