> -----Original Message-----
> From: Etienne Marcotte [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 24, 2001 1:39 PM
> To: Brett W. McCoy
> Cc: [EMAIL PROTECTED]
> Subject: Re: mod_perl
> 
> 
> Ok, thanks for the infos.
> 
> Do I need to type use mod_perl; in scripts?

No. A script cannot "invoke" mod_perl; it's the other way around. The
Apache server configuration must be set up to enable mod_perl to handle
the request. When this is done, mod_perl will call a handler, typically
Apache::Registry, which in turn will call your script.

> And is scipting in strict enough as of "good" scripting is involved?

For Apache::Registry, see the caveats in the mod_perl guide.

The two main things to deal with are:

1. You cannot have file-scoped "my" variables and access them from
subs in your script. You typically need to change these to globals
using "our". The reason for this is documented in the mod_perl guide.

2. Since the perl interpreter hangs around after your script is finished
(since it's part of the Apache process), global variables will retain
their values between invocations of your script. You either need to make
sure and properly initialize any global variables, or use "local" to
get fresh copies for each invocation that are freed at the end of your
script.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to