24.5.7.6. PerlInterpScope
As mentioned, when a request in a threaded MPM is handled by
mod_perl, an interpreter must be pulled from the interpreter pool.
The interpreter is then available only to the thread that selected
it, until it is released back into the interpreter pool. By default,
an interpreter will be held for the lifetime of the request,
equivalent to this configuration:
PerlInterpScope request
For example, if a PerlAccessHandler is configured,
an interpreter will be selected before it is run and not released
until after the logging phase.
Interpreters will be shared across subrequests by default; however,
it is possible to configure the interpreter scope to be per
subrequest on a per-directory basis:
PerlInterpScope subrequest
With this configuration, an autoindex-generated page, for example,
would select an interpreter for each item in the listing that is
configured with a Perl*Handler.
It is also possible to configure the scope to be per handler:
PerlInterpScope handler
With this configuration, an interpreter will be selected before
PerlAccessHandlers are run and put back
immediately afterwards, before Apache moves on to the authentication
phase. If a PerlFixupHandler is configured further
down the chain, another interpreter will be selected and again put
back afterwards, before PerlResponseHandler is
run.