in reply to Apache::Registry with CPanel
If I understand your question correctly, you want to know if you need to include ...
use Apache::Registry;... in your scripts. The answer is no.
Apache::Registry is a special type of module known as a mod_perl handler. To oversimplify things a bit, it reverses the normal relationship and 'uses' your script :-)
The configuration snippet you quoted is a way of telling Apache that any URL that starts /perl/ should be handled by Apache::Registry which in turn will look in /perl/apache/scripts/ for a specific script to handle each request. This is an alternative to using Apache's 'ScriptAlias' directive to have requests that start /cgi-bin/ handled by mod_cgi.
Setting up a handler this way affects all scripts in the directory.
Update: I forgot to mention that your coding needs to be a bit more careful under Apache::Registry than under CGI. Make certain your script runs with 'use strict;' and make sure that any global variables are declared with 'our' rather than 'my'. You'll also want to check the error log for warnings.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Apache::Registry
by CountZero (Bishop) on Dec 18, 2002 at 10:58 UTC | |
|
Re: Re: Apache::Registry
by Andy (Novice) on Dec 18, 2002 at 07:46 UTC | |
by grantm (Parson) on Dec 18, 2002 at 10:04 UTC | |
by rdfield (Priest) on Dec 18, 2002 at 10:01 UTC |