Hi,

To explain exactly what is going on...

The "Files" directive is an *apache* not mod_perl directive. You can use it within apache to define specific rules for a file (or bunch of files).

The "SetHandler" directive is also an apache directive, that tells apache what hander should be used.

So for instance this:

   <Files *.cgi>
       SetHandler perl-script
   </Files>

tells apache that all files matching *.cgi should be handled by perl-script which is mod_perl.

The "PerlHandler" directive is mod_perl, it tells mod_perl which perl module should be used as the handler.

In the case of Apache::Registry this is a perl module that attempts to provide some of the advantages of mod_perl to regular cgi scripts. In particular you get use of the built-in perl interpreter, and your perl files are only interpreted when they are changed rather than everytime they are requested. This is the "cache" that you referred to in your first post.

The "Options" directive sets permissions, in this case it allows files to be executed as CGI. This option is also required by Apache::Registry.


Now you'll have to be very careful as you're not really caching CGI scripts. The Apache::Registry module does a reasonable job of making things works, but there are issues to be wary of. The "porting" page that's already been suggested lists all the pitfalls.


You may also want to investigate Apache::PerlRun. This is similar to Apache::Registry in that it uses the built-in perl interpreter but it reloads the script on every request. This means that it doesn't give the same performance benefit that Apache::Registry does, but on the other hand it's immune to some of the problems.

Hope this answers your question.

Carl




Reply via email to