perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Malcolm J Harwood <mjhlist-modp...@liminalflux.net>
Subject Re: mod_perl and multi user environment - clashes with other users's data
Date Thu, 01 Dec 2005 21:55:53 GMT
On Thursday 01 December 2005 04:48 pm, Senthil Nathan wrote:
> im using globals with the keyword "use".
> also it worked fine without mod_perl.
>
> thats what worries now...

mod_perl is a persistent environment. cgi-bin loads a fresh perl interpreter 
each time. You have to do some things differently because of this. (Most of 
which is just good practise).

> i tried ModPerl:;PerlRun in the httpd.conf and see no change in the global
> data being used by others.
>
> so how can i do away with that problem???

Don't use "use" for variables. Use "my" to declare them. (and 'use strict' if 
you aren't already). That should solve the problem with running under 
PerlRun. 

If that doesn't work, you've got some other issue (quite possibly closures). 




-- 
Sgt. Benton: "What do we do now?"
The Doctor: "Keep it confused. Feed it with useless information. I wonder
             if I have a television set handy..."

Mime
View raw message