in reply to mod_perl and multi user environment - clashes with other users's data

hi ikegami,

that works fine. thanks a lot.

but i found in some sites like to use lot of modules in the httpd.conf to make this work...

is there any way to use some module like PerlRun to resolve this problem???

thanks
rsennat
  • Comment on Re: mod_perl and multi user environment - clashes with other users's data

Replies are listed 'Best First'.
Re^2: mod_perl and multi user environment - clashes with other users's data
by perrin (Chancellor) on Dec 02, 2005 at 18:40 UTC
    You can use PerlRun to solve this. It will run more slowly, but should work and will still be faster than CGI. Fixing the code is the best way to solve it.

      Specifically,

      This module's handler emulates the CGI environment, allowing programmers to write scripts that run under CGI or mod_perl without change. Unlike Apache::Registry, the Apache::PerlRun handler does not cache the script inside of a subroutine. Scripts will be "compiled" every request. After the script has run, it's namespace is flushed of all variables and subroutines.

      The Apache::Registry handler is much faster than Apache::PerlRun. However, Apache::PerlRun is much faster than CGI as the fork is still avoided and scripts can use modules which have been pre-loaded at server startup time. This module is meant for "Dirty" CGI Perl scripts which relied on the single request lifetime of CGI and cannot run under Apache::Registry without cleanup.

      It works because scripts are compiled at every request. I don't recommend using PerlRun unless you're trying to run an existing CGI script in mod_perl. If you're writting a script for mod_perl, you shouldn't use PerlRun.

        So, the better way is to having a clean code without global variables and passing the arguments wherever needed.

        thanks a lottttt!!!!!!!!!

        rsennat