Re: localized lexical varibles

[prev] [thread] [next] [Date index for 2005/03/15]

From: Vladimir D Belousov
Subject: Re: localized lexical varibles
Date: 19:41 on 15 Mar 2005
Michael Peters wrote:

> Vladimir D Belousov wrote:
>
>> Tom Schindl wrote:
>>
>>> Vladimir D Belousov wrote:
>>
>>
>> [skipped]
>
>
> The variables would get reinitialized if you passed them in as 
> arguments. The link that I sent you explains that once the Call sub is 
> compiled it creates a closure around the $r and $s variables so that 
> even if they are changed in other places, that closure will make sure 
> that Call never sees those changes.

I see, thanks.  Almost :(
What destiny of my closer variable changed in other process?
It will keep the value for current process? And for forked httpd process?
If yes, I cannot understand the difference between the httpd fork and 
the next request working.
Or this values is a "heritage" of the previous tasks only?

>
>> By the way, any compilation time errors are found out only at the 
>> request to the Apache.
>> But how such code Apache loads? I mean if a code has sintax errors, 
>> for example.
>> Or Apache loads code only with first client request?
>
>
> If you preload your modules in a startup.pl or by a PerlLoadModule 
> directive then apache will not start if there are syntax errors. If 
> you don't do that however, you'll have to wait until the first time 
> apache compiles the module, which is normally at request time.
>
> A good idea is to preload all of your modules and then use 
> Apache::Reload inside of the modules you are still developing.
>
> HTH
>

localized lexical varibles
Vladimir D Belousov 17:29 on 15 Mar 2005

Re: localized lexical varibles
Michael Peters 17:30 on 15 Mar 2005

Re: localized lexical varibles
Vladimir D Belousov 19:27 on 15 Mar 2005

Re: localized lexical varibles
Perrin Harkins 23:59 on 15 Mar 2005

Re: localized lexical varibles
Tom Schindl 17:40 on 15 Mar 2005

Re: localized lexical varibles
Vladimir D Belousov 18:54 on 15 Mar 2005

Re: localized lexical varibles
Michael Peters 18:59 on 15 Mar 2005

Re: localized lexical varibles
Vladimir D Belousov 19:41 on 15 Mar 2005

Generated at 16:59 on 18 Mar 2005 by mariachi v0.52