Stas Bekman wrote:
>  
> I think you confuse,
> something. When the script is recompiled all the variables belonging to
> the package decalared by Apache::Registry or similar are getting reset. If
> you require/use() some modules that declare packages and have global
> variables -- these won't be reset unless reloaded or initialized in your
> code.

OK, we've lost my original question here, but what I was saying was
this:

I have a script that is in Apache::Registry.  (It's showing up in
"Compiled Registry Scripts" in perl-status).

The global variables are *not* getting set on recompilation.  Are you
saying they should?
> 
> > > *You* have straightened me out, on the other hand.
> > >
> > > So, lessee, BEGIN { somevar=somevalue; } ought to work for a variable I
> > > want reinitialized at compilation only...
> 
> Not if you are talking about the scripts running under Apache::Registry
> and friends, please read the guide.
> http://perl.apache.org/guide/porting.html#BEGIN_blocks
> 
Stas, what are you talking about?  Your own guide says:

"BEGIN blocks in Apache::Registry scripts will be executed, as above
plus: 
                ...
An additional time, once per child process, each time the script file
changes on disk. "

I.e., at compilation.  And that is what I'm seeing, and it's the
behavior I want.

I think you are confused about what I am saying.  Probably working too
much on the template guide...  :-)

Reply via email to