PerlEx Registry Entries

You can find the PerlEx registry entries in registry key:

[HKEY_LOCAL_MACHINE/SOFTWARE/ActiveState/PerlEx/<version>]

Many of the registry entries specified here can appear either under the top level registry key above, or be associated with an Interpreter Class, or both. Entries under the top level registry key describe the options in the Default Interpreter Class. These options can be inherited by Interpreter Classes that do not override the same options with a corresponding setting within the registry key that describes that Interpreter Class.

CommandLineOptions

STRING or BINARY Value. Commandline Options can be added to alter the configuration of the Perl interpreters that PerlEx starts. Most Perl commandline options can be entered here. For instance, to turn on tainting, you can add -T to the commandline options. This entry is also used to preload Perl modules. For example, to preload the PerlEx::DBImodule, add -mPerlEx::DBI. To enable debugging, add -d.

This can be specified at both the top level key and within registry keys for Interpreter Classes.

DisableImpersonate

DWORD Value. By default, scripts running under PerlEx will execute using the authentication of the client, or the default Anonymous user configured in IIS. If set to non zero, scripts will run as the user the IIS Service is configured to run under, which is typically system.

The default value is 0 (off).

This registry entry is optional. If not set, it defaults to 0. It can be set both at the top level and within registry keys for Interpreter Classes.

DisableThreadPool

DWORD Value. This option controls whether scripts will use that thread pool or not. If set to 1, PerlEx will not execute scripts using the thread pool managed by PerlEx.

This may be needed for scripts that must execute in the calling web server thread.

The default value is 0 (use of the thread pool is enabled when the thread pool is available). This option can be set both at the top level and within registry keys for Interpreter Classes.

Embed

Contains a key whose name is the extension for files that contain embedded Perl. The default extension is .aspl. The .aspl key contains 3 values: begin, end and decode.

Here are the default values:

name type value
begin String <%
decode DWORD 0
end String %>

To associate another file extension with this feature, duplicate the .aspl key, and give the new key a name which corresponds to the new file extension. Include the leading dot in the name.

The Embed key and its contents must be present. It can be set only at the top level registry key.

For more information on embedding scripts with PerlEx see Embedding Perl in HTML files.

EnableCGIHeader

DWORD Value. Determines whether PerlEx adds HTTP headers or not.

Can take the values of 0 and 1. The default value is 1 (on).

When EnableCGIHeader is set to 1, PerlEx will emit Server: and Date: HTTP header lines.

If you are using Server Side Includes in the documents which you are serving with PerlEx, set EnableCGIHeader to 0 (off).

If you see HTTP header information appearing in the body of the client browser, you should change EnableCGIHeader registry entry to 0.

If EnableCGIHeader is set to 0, you are responsible for outputting all HTTP headers.

This registry entry is optional. If not set, it defaults to 1. It can be set both at the top level and within registry keys for Interpreter Classes.

EnableDebugOutput

DWORD Value. Determines if information that normally goes to the PerlEx log files is sent to the browser or not.

Can take the values of 0 and 1. The default value is 0 (off).

This registry entry is optional. If not set, it defaults to 0. It can be set both at the top level and within registry keys for Interpreter Classes.

EnableReadAhead

DWORD Value. If non-zero, enables web server read-ahead for processing the request. Read-ahead improves the handling of large POST requests that might otherwise tie up PerlEx interpreters for the duration it takes for the request to be sent over the network. On the other hand, enabling read-ahead results in increased memory consumption on the server, because all of the read-ahead data must be buffered before it can be processed.

When serving a POST request, PerlEx will attempt to read all of the request before acquiring an interpreter, subject to the following limits:

This registry entry is optional. If not set, it defaults to 0 (off). It can be set both at the top level and within registry keys for Interpreter Classes.

See OverLimitFileName, ReadAheadMemorySizeLimit, and ReadAheadFileSizeLimit

Environment

STRING or BINARY Value. This entry can be used to preset additional environment variables needed by scripts. One use is to set the PERLDB_OPTS variable for debugging scripts running under PerlEx.

Each environment entry is made up of the variable name and its value, separated by a single = character, with no spaces surrounding it. If there are multiple environment entries, they must be delimited with a newline.

Note: newline characters in a registry value can be entered in the Registry Editor (either REGEDIT or REGEDT32) by pressing and holding the ALT key, typing 10 (i.e. one, zero) on the numeric keypad, and then releasing the ALT key. For more information on this method of entering characters, search the Microsoft Windows help documentation for "input characters using ALT numeric keypad".

The default value is the empty string. It can be set both at the top level and within registry keys for Interpreter Classes.

Interpreters

DWORD Value. Sets the maximum number of interpreters that can be created to service requests within a particular Interpreter Class. If set to zero, PerlEx script caching will be disabled, and scripts will be loaded and compiled for every request in a brand new interpreter. This "zero interpreter mode" is useful to provide compatibility for some Perl CGI scripts. See the FAQ for more information.

The default value is 3.

This registry entry is optional. If not set, it defaults to 3. It can be set both at the top level and within registry keys for Interpreter Classes.

LogPath

String value. The path to where the interpreter log files will be written. The log files have the form 'PerlEx-Err-AAAA-NNN.log', where 'NNN' is the ID of the interpreter that created the log, and 'AAAA' is the Interpreter Class name with which the interpreter is associated.

The default value is the directory where PerlEx.dll is located.

This registry entry is optional. It can only be set at the top level registry key.

OverLimitFileName

String value. The path to a file containing information sent to the browser when the amount of read-ahead required to process the request exceeds the larger of ReadAheadMemorySizeLimit and ReadAheadFileSizeLimit. This file is used only if EnableReadAhead is set.

This registry entry is optional. If not set, no notification will be sent. It can be set both at the top level and within registry keys for Interpreter Classes.

ReadAheadFileSizeLimit

DWORD Value. The maximum amount of POST data that will be accepted and backed by a temporary file, specified in bytes.

This registry entry is optional. If not set, it defaults to 0x01000000 (16 MB). It can be set both at the top level and within registry keys for Interpreter Classes.

See OverLimitFileName

ReadAheadMemorySizeLimit

DWORD Value. The amount of POST data that will be backed entirely in memory, specified in bytes.

This registry entry is optional. If not set, it defaults to 0x00200000 (2 MB). It can be set both at the top level and within registry keys for Interpreter Classes.

See OverLimitFileName

Reload

DWORD Value. Determines the number of scripts an interpreter must run before it is reloaded.

This registry entry is optional. If not set, it defaults to 1024 (0x400 hex). It can be set both at the top level and within registry keys for Interpreter Classes.

ScriptLocation

String value. Specifies a partial or full path name where an interpreter can find an executable script or a set of scripts. Paths must be absolute, and either forward or backslashes may be used to separate file and directory components in the path.

When there is more than one Interpreter Class, PerlEx associates a given script with the Interpreter Class that has the most specific ScriptLocation that matches as a valid path prefix for the script. For example, consider three different Interpreter Classes with the following ScriptLocation entries:

  1. C:/foo/bar/baz.plex
  2. C:/foo/baz/
  3. C:\foo\b

A given script C:/foo/bar/baz.plex will match the first Interpreter Class; C:/foo/bar.plex will match the third Interpreter class; C:\foo\baz\xxx.aspl will match the second; and D:\mno\pqr.plex will match the Default Interpreter Class.

This registry entry is mandatory within every Interpreter Class, and can only be set within registry keys for Interpreter Classes.

StartupCode

STRING or BINARY Value. This entry can be used to enter code that you want to have executed at the beginning of every script, during the execution phase.

The default value is empty. It can be set both at the top level and within registry keys for Interpreter Classes.

Trace

DWORD Value. Sets the verbosity of information written to the PerlEx log (PerlEx-Err-NNN.log or PerlEx-Err-AAAA-NNN.log).

Values are 1-4 (1 is minimal feedback, 4 is maximal feedback), 0 is no feedback. The default value is 0.

This registry entry is optional. If not set, it defaults to 0. It can be set both at the top level and within registry keys for Interpreter Classes.

UseAsyncReadAhead

DWORD Value. If non zero, PerlEx will ask the web server to read POST data asynchronously.

This value is only meaningful if EnableReadAhead is enabled.

This registry entry is optional. If not set, it defaults to 0 (off). It can be set both at the top level and within registry keys for Interpreter Classes.