Re: shared variable between PerlChildInitHandler and PerlResponseHandler

André Warnier <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Mark Risher wrote:
...
> 
> [mr] I'm getting different addresses, which illustrates the problem
> 
> 2010/08/19 18:13:37 child_init &sticky = SCALAR(0x220ea748)
> 2010/08/19 18:13:37 child_init sticky (pre) = 0
> 2010/08/19 18:13:37 child_init sticky (post) = 1
> ...
> 2010/08/19 18:13:48 handler sticky (should be 1)= 0
> 2010/08/19 18:13:48 handler &sticky = SCALAR(0x23102e28)
>  
Have you tried :

package StartupLog;

use strict;

# the variable I'm testing
our $sticky = 0;

...
(I don't think that the "= 0" bit is ever going to be executed, but your are doing it 
anyway in your init handler.)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.