On Tue, 2007-07-31 at 10:09 +0800, Ken Perl wrote:
> I didn't run it under ModPerl::Registry, is there any risk to use the
> module? maybe I have to run lots of testing to the existing scripts.
> 


There is a risk to using this module, but also a significant benefit:
speed.

The risks come from:

 - the fact that your script has been written to run one and then exit, 
   so you may have a number of variables that aren't initialised 
   properly - this can produce unexpected errors

 - ModPerl::Registry wraps your script in another sub, which may produce
   unexpected closures (you would see warnings about variables not 
   remaining shared in your log)

So if you move to using Registry, then you will need to check your
scripts.

However, using Registry means that your script is loaded and compiled
once, avoiding this performance hit for subsequent requests - hence it
runs faster.

Have a look at this post that I wrote about gotchas under Registry, it
may help you migrate:
http://www.gossamer-threads.com/lists/modperl/modperl/94203#94203

Clint
 

Reply via email to