Configuration can be setup in different ways, depending how you run Embperl.
When you run under mod_perl, Embperl add a set of new configuration directives
to the Apache configuration, so you can set them in your httpd.conf .
When you run Embperl as CGI it takes the configuration from environment variables.
For compatibility reason that
can also be turned on under mod_perl, by adding Embperl_UseEnv on in your
httpd.conf . When you call Embperl from another Perl program, by calling
the Execute function, you can pass your configuration along with other parameters
as a hash reference. If you pass use_env =< 1 als parameter Embperl will
also scan the environment for configuration information. Last but not least
you can pass configuration information as options when you run Embperl via
embpexec.pl from the command line. Some of the configuration options are
also setable inside the page via the Empberl objects and you can read the
current configuration from these objects. You can not only pass configuration in different ways, there are also three different
contexts: Application, Request and Component.
A application describes a
set of pages/files that belongs together and form the application. Application level
configuration are the same for all files that belongs to an application. These
configuration information need to be known before any request processing takes place,
so they can't be modified during a request. Every application has it's own name.
You can refer the configuration of an application, by simply setting the name
of the application to use. Request level configuration information applies to one request, some of them must
be known before the request starts, some of them can still be modified during the request. Configuration for components can be setup before the request, but can also be passed
as argument when you call the component via Execute .
| Env: | | EMBPERL_USEENV | | | Method: | | $application -> config -> use_env [read only] | | | Default: | | off unless running as CGI script | | | Since: | | 2.0b6 | |
Tells Embperl to scan the enviromemt for configuration settings.
| Method: | | $application -> config -> use_redirect_env [read only] | | | Default: | | off unless running as CGI script | | | Since: | | 2.0b6 | |
Tells Embperl to scan the enviromemt for configuration settings which has the
prefix REDIRECT_ . This is normally the case when the request is not the main request,
but a subrequest.
| Env: | | EMBPERL_APPNAME | | | Method: | | $application -> config -> app_name [read only] | | | Since: | | 2.0b6 | |
Specifies the name for an application. The name is basically used to refer to this application
elsewhere in httpd.conf without the need to setup the parameters for the apllication again.
Embperl_App_Handler_Class | top |
| Env: | | EMBPERL_APP_HANDLER_CLASS | | | Method: | | $application -> config -> app_handler_class [read only] | | | Since: | | 2.0b6 | |
Embperl will call the init method of the given class at the start of the request,
but after all request parameters are setup. This give the class a chance to
do any necessary computation and modify the request parameters, before the request
is actualy executed. See internationalization for an example.
Embperl_Session_Handler_Class | top |
| Env: | | EMBPERL_SESSION_HANDLER_CLASS | | | Method: | | $application -> config -> session_handler_class [read only] | | | Default: | | Apache::SessionX | | | Since: | | 1.3b3 | | | See also: | | Session Handling | |
Set the class that performs the Embperl session handling. This gives you
the possibility to implement your own session handling. NOTE: Default until
1.3.3 was HTML::Embperl::Session , starting with 1.3.4 it is
Apache::SessionX . To get the old session behaviour set it to
HTML::Embperl::Session .
| Env: | | EMBPERL_SESSION_ARGS | | | Method: | | $application -> config -> session_args [read only] | | | Since: | | 1.3b3 | | | See also: | | Session Handling | |
List of arguments for Apache::Session classes
Arguments that contains spaces can be quoted.
Example: EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:session UserName=www 'Password=secret word'"
Embperl_Session_Classes | top |
| Env: | | EMBPERL_SESSION_CLASSES | | | Method: | | $application -> config -> session_classes [read only] | | | Since: | | 1.3b3 | | | See also: | | Session Handling | |
Space separated list of object store and lock manager
(and optionally the serialization and id generating class)
for Apache::Session (see Session handling)
Embperl_Session_Config | top |
| Env: | | EMBPERL_SESSION_CONFIG | | | Method: | | $application -> config -> session_config [read only] | | | Default: | | given when running Makefile.PL of Apache::SessionX | | | Since: | | 1.3.3 | | | See also: | | Session Handling | |
Selects a session configuration from the configurations you have defined when running
Apache::SessionX's Makefile.PL . NOTE: Use either EMBPERL_SESSION_CONFIG or EMBPERL_SESSION_ARGS and EMBPERL_SESSION_CLASSES
| Env: | | EMBPERL_COOKIE_NAME | | | Method: | | $application -> config -> cookie_name [read only] | | | Default: | | EMBPERL_UID | | | Since: | | 1.2b4 | | | See also: | | Session Handling | |
Set the name that Embperl uses when it sends the cookie with the session id.
| Env: | | EMBPERL_COOKIE_DOMAIN | | | Method: | | $application -> config -> cookie_domain [read only] | | | Default: | | none | | | Since: | | 1.2b4 | | | See also: | | Session Handling | |
Set the domain that Embperl uses for the cookie with the session id.
| Env: | | EMBPERL_COOKIE_PATH | | | Method: | | $application -> config -> cookie_path [read only] | | | Default: | | none | | | Since: | | 1.2b4 | | | See also: | | Session Handling | |
Set the path that Embperl uses for the cookie with the session id.
Embperl_Cookie_Expires | top |
| Env: | | EMBPERL_COOKIE_EXPIRES | | | Method: | | $application -> config -> cookie_expires [read only] | | | Default: | | at the end of the session | | | Since: | | 1.3b5 | | | See also: | | Session Handling | |
Set the expiration date that Embperl uses for the cookie with the session id.
You can specify the full date or relativ values.
The following forms are all valid times: +30s 30 seconds from now
+10m ten minutes from now
+1h one hour from now
-1d yesterday (i.e. "ASAP!")
now immediately
+3M in three months
+10y in ten years time
Thu, 25-Apr-1999 00:40:33 GMT at the indicated time & date
| Env: | | EMBPERL_COOKIE_SECURE | | | Method: | | $application -> config -> cookie_secure [read only] | | | Default: | | at the end of the session | | | Since: | | 2.0b9 | | | See also: | | Session Handling | |
Set the secure flag of cookie that Embperl uses for the session id. If set the
cookie will only be transferred over a secured connection.
| Env: | | EMBPERL_LOG | | | Method: | | $application -> config -> log [read only] | | | Default: | | Unix: /tmp/embperl.log Windows: /embperl.log | |
Gives the location of the log file. This will contain information
about what Embperl is doing. The amount of information depends on the
debug settings (see EMBPERL_DEBUG below). The log output is intended to show what
your embedded Perl code is doing and to help debug it.
| Env: | | EMBPERL_DEBUG | | | Method: | | $application -> config -> debug | |
This is a bitmask which specifies what should be written to the log.
To specify multiple debugflags, simply add the values together.
You can give the value a decimal, octal (prefix 0) or hexadecimal (prefix 0x) value.
You can also use the constants defined in Embperl::Constant.
The following values are defined: | dbgStd = 1 (0x1) | | Show minimum information. | | | dbgMem = 2 (0x2) | | Show memory and scalar value allocation. | | | dbgEval = 4 (0x4) | | Show arguments to and results of evals. | | | dbgEnv = 16 (0x10) | | List every request's environment variables. | | | dbgForm = 32 (0x20) | | List posted form data. | | | dbgInput = 128 (0x80) | | Show processing of HTML input tags. | | | dbgFlushOutput = 256 (0x100) | | Flush Embperl's output after every write. This should only be set to
help debug Embperl crashes, as it drastically slows down Embperl's
operation. | | | dbgFlushLog = 512 (0x200) | | Flush Embperl's logfile output after every write. This should only be
set to help debug Embperl crashes, as it drastically slows down
Embperl's operation. | | | dbgLogLink = 8192 (0x2000) | | This feature is not yet implemented in Embperl 2.0! Inserts a link at the top of each page which can be used to view the
log for the current HTML file. See also EMBPERL_VIRTLOG. Example: EMBPERL_DEBUG 10477
EMBPERL_VIRTLOG /embperl/log.htm
<Location /embperl/log.htm>
SetHandler perl-script
PerlHandler Embperl
Options ExecCGI
</Location> | | | dbgDefEval = 16384 (0x4000) | | Shows every time new Perl code is compiled. | | | dbgHeadersIn = 262144 (0x40000) | | Log all HTTP headers which are sent from and to the browser. | | | dbgShowCleanup = 524288 (0x80000) | | Show every variable which is undef'd at the end of the request. For
scalar variables, the value before undef'ing is logged. | | | dbgSession = 2097152 (0x200000) | | Enables logging of session transactions. | | | dbgImport = 4194304 (0x400000) | | Show how subroutines are imported in other namespaces. | | | dbgOutput = 0x08000 | | Logs the process of converting the internal tree strcuture to plain text for output | | | dbgDOM = 0x10000 | | Logs things related to processing the internal tree data structure of documents | | | dbgRun = 0x20000 | | Logs things related to execution of a document | | | dbgBuildToken = 0x800000 | | Logs things related to creating the token tables for source parsing | | | dbgParse = 0x1000000 | | Logs the parseing of the source | | | dbgObjectSearch = 0x2000000 | | Shows how Embperl::Objects searches sourcefiles | | | dbgCache = 0x4000000 | | Logs cache related things | | | dbgCompile = 0x8000000 | | Gives information about compiling the parsed source to Perl code | | | dbgXML = 0x10000000 | | Logs things related to XML processing | | | dbgXSLT = 0x20000000 | | Logs things related to XSLT processing | | | dbgCheckpoint = 0x40000000 | | Logs things related to checkpoints which are internaly used during execution.
This information is only useful if you have a deep knowledge of Embperl
internals. | |
| Env: | | EMBPERL_MAILDEBUG | | | Method: | | $application -> config -> maildebug | | | Since: | | 1.2.1 | |
Debug value pass to Net::SMTP.
| Env: | | EMBPERL_MAILHOST | | | Method: | | $application -> config -> mailhost | | | Default: | | localhost | |
Specifies which host the mail related functions of Embperl uses as SMTP server.
| Env: | | EMBPERL_MAILHELO | | | Method: | | $application -> config -> mailhelo | | | Default: | | chosen by Net::SMTP | | | Since: | | 1.3b4 | |
Specifies which host/domain all mailrealted function uses
in the HELO/EHLO command.
A reasonable default is normally chosen by Net::SMTP, but
depending on your installation it may necessary to set it
manualy.
| Env: | | EMBPERL_MAILFROM | | | Method: | | $application -> config -> mailfrom | | | Default: | | www-server@<server_name> | | | Since: | | 1.2.1 | |
Specifies the email address that is used as sender all mailrelted function.
Embperl_Mail_Errors_To | top |
| Env: | | EMBPERL_MAIL_ERRORS_TO | | | Method: | | $application -> config -> mail_errors_to | |
If set all errors will be send to the email address given.
Embperl_Mail_Errors_Limit | top |
| Env: | | EMBPERL_MAIL_ERRORS_LIMIT | | | Method: | | $application -> config -> mail_errors_limit [read only] | | | Since: | | 2.0b6 | |
Do not mail more then <num> errors. Set to 0 for no limit.
Embperl_Mail_Errors_Reset_Time | top |
| Env: | | EMBPERL_MAIL_ERRORS_RESET_TIME | | | Method: | | $application -> config -> mail_errors_reset_time [read only] | | | Since: | | 2.0b6 | |
Reset error counter if for <sec> seconds no error has occurred.
Embperl_Mail_Errors_Resend_Time | top |
| Env: | | EMBPERL_MAIL_ERRORS_RESEND_TIME | | | Method: | | $application -> config -> mail_errors_resend_time [read only] | | | Since: | | 2.0b6 | |
Mail errors of <sec> seconds regardless of the error counter.
| Env: | | EMBPERL_OBJECT_BASE | | | Method: | | $application -> config -> object_base [read only] | | | Default: | | _base.epl | | | Since: | | 1.3b1 | |
Name of the base page that Embperl::Objects searches for.
| Env: | | EMBPERL_OBJECT_APP | | | Method: | | $application -> config -> object_app | | | Since: | | 2.0b6 | |
Filename of the application object that Embperl::Object searches for.
The file should contain the Perl code for
the application object. There must be no package name given (as the package is set
by Embperl::Object) inside the file, but the @ISA should point to Embperl::App.
If set this file is searched through the same search path as any content file.
After a successful load the init method is called with the Embperl request object
as parameter. The init method can change the parameters inside the request object
to influence the current request.
Embperl_Object_Addpath | top |
| Env: | | EMBPERL_OBJECT_ADDPATH | | | Method: | | $application -> config -> object_addpath | | | Since: | | 1.3b1 | |
Additional directories where Embperl::Object searches for pages. This search through the searchpath is always performed if in a call to
Execute no path for the file is given.
In F<httpd.conf> or as environment variable directories are
separated by C<;> (on Unix C<:> works also). The parameter for C<Execute> and
the application object method expects/returns an array reference.
This path is
B<always> appended to the searchpath.
Embperl_Object_Reqpath | top |
| Env: | | EMBPERL_OBJECT_REQPATH | | | Method: | | $application -> config -> object_reqpath | | | Since: | | 2.0b12 | |
Additional directories where Embperl::Object searches for files for the initial request. If a file is requested, but cannot be found at the given location, the directories
given in the this path are additionally searched for the file. This applies only to
the initial filename given to Embperl::Object and not to files called via
Execute. In httpd.conf or as environment variable directories are
separated by ; (on Unix : works also). The parameter for Execute and
the application object method expects/returns an array reference. Example: if you say Embperl_Object_Reqpath /a:/b:/c and you request /x/index.epl it will try /x/index.epl
/a/index.epl
/b/index.epl
/c/index.epl and take the first one that is found.
Embperl_Object_Stopdir | top |
| Env: | | EMBPERL_OBJECT_STOPDIR | | | Method: | | $application -> config -> object_stopdir | | | Since: | | 1.3b1 | |
Directory where Embperl::Object stops searching for the base page.
Embperl_Object_Fallback | top |
| Env: | | EMBPERL_OBJECT_FALLBACK | | | Method: | | $application -> config -> object_fallback | | | Since: | | 1.3b1 | |
If the requested file is not found by Embperl::Object, the file given by EMBPERL_OBJECT_FALLBACK
is displayed instead. If EMBPERL_OBJECT_FALLBACK isn't set a
staus 404, NOT_FOUND is returned as usual. If the fileame given in
EMBPERL_OBJECT_FALLBACK doesn't contain a path, it is searched thru the same
directories as EMBPERL_OBJECT_BASE .
Embperl_Object_Handler_Class | top |
| Env: | | EMBPERL_OBJECT_HANDLER_CLASS | | | Method: | | $application -> config -> object_handler_class | | | Since: | | 1.3b1 | |
If you specify this, the template base and the requested page inherit all
methods from this class. This class must contain Embperl::Req in his
@ISA array.
| Env: | | EMBPERL_USEENV | | | Method: | | $request -> config -> use_env [read only] | | | Default: | | off unless running as CGI script | | | Since: | | 2.0b6 | |
Tells Embperl to scan the enviromemt for configuration settings.
| Method: | | $request -> config -> use_redirect_env [read only] | | | Default: | | off unless running as CGI script | | | Since: | | 2.0b6 | |
Tells Embperl to scan the enviromemt for configuration settings which has the
prefix REDIRECT_ . This is normally the case when the request is not the main request,
but a subrequest.
| Env: | | EMBPERL_ALLOW | | | Method: | | $request -> config -> allow [read only] | | | Default: | | no restrictions | | | Since: | | 1.2b10 | |
If specified, only files which match the given perl regular expression will be
processed by Embperl. All other files will return FORBIDDEN.
This is especially useful in a CGI environment by making the server more secure.
| Env: | | EMBPERL_URIMATCH | | | Method: | | $request -> config -> urimatch [read only] | | | Default: | | process all files | | | Since: | | 2.0b6 | |
If specified, only files which match the given perl regular expression will be
processed by Embperl, all other files will be handled by the standard Apache
handler. This can be useful if you have Embperl documents and non Embperl
documents (e.g. gifs) residing in the same directory. Example:
# Only files which end with .htm will processed by Embperl
EMBPERL_URIMATCH \.htm$
| Env: | | EMBPERL_MULTFIELDSEP | | | Method: | | $request -> config -> mult_field_sep [read only] | | | Default: | | \t | | | Since: | | 2.0b6 | |
Specifies the character that is used to separate multiple form values with the
same name.
| Env: | | EMBPERL_PATH | | | Method: | | $request -> config -> path [read only] | | | Since: | | 1.3b6 | |
Can contain a semicolon (also colon under Unix) separated file search path.
When a file is processed and the filename isn't an absolute path or
does not start with ./ (or .\ under windows), Embperl searches all
the specified directories for that file. A special handling is done if the filename starts with any number
of ../ i.e. refers to an upper directory. Then Embperl strips
the same number of entries at the start of the searchpath as the filename
contains ../ .
Execute and the method of the request object expects/returns a array ref.
| Env: | | EMBPERL_DEBUG | | | Method: | | $request -> config -> debug | |
See application configuration for an describtion of possible values
| Env: | | EMBPERL_OPTIONS | | | Method: | | $request -> config -> options | |
This bitmask specifies some options for the execution of Embperl.
To specify multiple options, simply add the values together. | optDisableVarCleanup = 1 | | Disables the automatic cleanup of variables at the end of each
request. | | | optDisableEmbperlErrorPage = 2 | | Tells Embperl not to send its own errorpage in case of failure,
but instead show as much of the page as possible. Errors are only logged
to the log file.
Without this option, Embperl sends its
own error page, showing all the errors which have occurred. If you
have dbgLogLink enabled, every error will be a link to the
corresponding location in the log file. This option has no effect if
optReturnError is set. | | | optReturnError = 262144 | | With this option set, Embperl sends no output in case of an error.
It returns the error back to Apache or the calling program. When running
under mod_perl this gives you the chance to use the Apache ErrorDocument
directive to show a custom error-document. Inside the ErrorDocument
you can retrieve the error messages with $errors = $req_rec -> prev -> pnotes('EMBPERL_ERRORS') ; where $errors is a array reference. (1.3b5+) | | | optShowBacktrace = 0x8000000 | | When set every error message not only show the sourcefiles, but all files
from which this file was called by Execute. | |
| Env: | | EMBPERL_OUTPUT_MODE | | | Method: | | $request -> config -> output_mode | | | Default: | | HTML | | | Since: | | 2.0b9 | |
Set the desired output format. 0 for HTML and 1 XML. If set to XML all tags
that are generated by Embperl will contain a closing slash to conform to XML
specs. e.g. <input type="text" name="foo" /> NOTE: If you set output_mode to XML you should also change escmode to XML escaping.
Embperl_Output_Esc_Charset | top |
| Env: | | EMBPERL_OUTPUT_ESC_CHARSET | | | Method: | | $request -> config -> output_esc_charset [read only] | | | Default: | | ocharsetLatin1 = 1 | | | Since: | | 2.0.2 | |
Set the charset which to assume when escaping. This can only be set
before the request starts (e.g. httpd.conf or top of the page).
Setting it inside the page has undefined results. | ocharsetUtf8 = 0 | | UTF-8 or any non known charset. Characters with codes above 128 will not be escaped
at all | | | ocharsetLatin1 = 1 | | ISO-8859-1, the default. When a Perl string has it's utf-8 bit set, this mode
will behave the same as mode 0, i.e. will not escape anything above 128. | | | ocharsetLatin2 = 2 | | ISO-8859-2. When a Perl string has it's utf-8 bit set, this mode
will behave the same as mode 0, i.e. will not escape anything above 128. | |
| Env: | | EMBPERL_SESSION_MODE | | | Method: | | $request -> config -> session_mode [read only] | | | Default: | | smodeUDatCookie = 1 | | | Since: | | 2.0b6 | |
Specifies how the id for the session data is passed between requests.
Possible values are: | smodeNone = 0 | | No session id will be passed | | | smodeUDatCookie = 1 | | The session id for the user session will be passed via cookie | | | smodeUDatParam = 2 | | The session id for the user session will append as parameter to any URL
and inserted as a hidden field in any form. | | | smodeUDatUrl = 4 | | The session id for the user session will passed as a part of the URL.
NOT YET IMPLEMENTED!! | | | smodeSDatParam = 0x20 | | The session id for the state session will append as parameter to any URL
and inserted as a hidden field in any form. | |
You may add the UDat and SDat values together to get both sorts of sessions,
for example the value 0x21 will pass the id for the user session inside a
cookie and the id for the state session as parameters.
| Env: | | EMBPERL_USEENV | | | Method: | | $component -> config -> use_env [read only] | | | Default: | | off unless running as CGI script | | | Since: | | 2.0b6 | |
Tells Embperl to scan the enviromemt for configuration settings.
| Method: | | $component -> config -> use_redirect_env [read only] | | | Default: | | off unless running as CGI script | | | Since: | | 2.0b6 | |
Tells Embperl to scan the enviromemt for configuration settings which has the
prefix REDIRECT_ . This is normally the case when the request is not the main request,
but a subrequest.
| Env: | | EMBPERL_PACKAGE | | | Method: | | $component -> config -> package | |
The name of the package where your code will be executed. By default,
Embperl generates a unique package name for every file. This ensures
that variables and functions from one file do not conflict with those of
another file. (Any package's variables will still be accessible with
explicit package names.)
| Env: | | EMBPERL_DEBUG | | | Method: | | $component -> config -> debug | |
See application configuration for an describtion of possible values
| Env: | | EMBPERL_OPTIONS | | | Method: | | $component -> config -> options | |
This bitmask specifies some options for the execution of Embperl.
To specify multiple options, simply add the values together. | optDisableVarCleanup = 1 | | Disables the automatic cleanup of variables at the end of each
request. | | | optDisableEmbperlErrorPage = 2 | | Tells Embperl not to send its own errorpage in case of failure,
but instead show as much of the page as possible. Errors are only logged
to the log file.
Without this option, Embperl sends its
own error page, showing all the errors which have occurred. If you
have dbgLogLink enabled, every error will be a link to the
corresponding location in the log file. This option has no effect if
optReturnError is set. | | | optReturnError = 262144 | | With this option set, Embperl sends no output in case of an error.
It returns the error back to Apache or the calling program. When running
under mod_perl this gives you the chance to use the Apache ErrorDocument
directive to show a custom error-document. Inside the ErrorDocument
you can retrieve the error messages with $errors = $req_rec -> prev -> pnotes('EMBPERL_ERRORS') ; where $errors is a array reference. (1.3b5+) | | | optShowBacktrace = 0x8000000 | | When set every error message not only show the sourcefiles, but all files
from which this file was called by Execute. | | | optSafeNamespace = 4 | | Tells Embperl to execute the embedded code in a safe namespace so the
code cannot access data or code in any other package. (See the
chapter about (Safe-)Namespaces and opcode restrictions below for more details.) | | | optOpcodeMask = 8 | | Tells Embperl to apply an operator mask. This gives you the chance to
disallow special (unsafe) opcodes. (See the Chapter about
(Safe-)Namespaces and opcode restrictions
below for more details.) | | | optDisableFormData = 256 | | This option disables the setup of %fdat and @Z<>ffld. Embperl will not do anything
with the posted form data.
Set this when using Execute from your perl script and you have already read the Form Data (via eg. CGI.pm). | | | optFormDataNoUtf8 = 0x2000000 | | By default Embperl checks all formfields in %fdat
if they contain valid UTF-8 strings and if yes sets Perl's
internals UTF-8 flag. If this option is set Embperl will never set the UTF-8 on any
data in %fdat. | | | optAllFormData = 8192 | | This option will cause Embperl to insert all formfields in %fdat and @Z<>ffld, even if they
are empty. Empty formfields will be inserted with an empty string. Without this option,
empty formfields will be absent from %fdat and @Z<>ffld. | | | optRedirectStdout = 16384 | | Redirects STDOUT to the Embperl output stream before every request and resets it afterwards.
If set, you can use a normal Perl print inside any Perl block to output data.
Without this option you can only use output data by using the [+ ... +] block, or printing
to the filehandle OUT. | | | optNoHiddenEmptyValue = 65536 (only 1.2b2 and above) | | Normally, if there is a value defined in %fdat for a specific input field, Embperl
will output a hidden input element for it when you use hidden. When this option
is set, Embperl will not output a hidden input element for this field when the
value is a blank string. | | | optKeepSpaces = 1048576 (only 1.2b5 and above) = 0x100000, | | Disable the removal of spaces and empty lines from the output. This is useful
for sources other than HTML. | | | optChdirToSource = 0x10000000 (only 2.5 and above) | | Change current working directory to the directory of the sourcefile,
before executing the source. | |
| Env: | | EMBPERL_ESCMODE | | | Method: | | $component -> config -> escmode | | | Default: | | 7 | |
Turn HTML and URL escaping on and off. NOTE: If you want to output binary data, you must set the escmode
to zero. For convenience you can change the escmode inside a page by setting
the variable $escmode . | escXML = 8 (or 15) (2.0b4 and above) | | The result of a Perl expression is always XML-escaped (e.g., `>'
becomes `>' and ' become '). | | | escUrl + escHtml = 3 (or 7) | | The result of a Perl expression is HTML-escaped (e.g., `>' becomes
`>') in normal text and URL-escaped (e.g., `&' becomes `%26')
within of A , EMBED , IMG , IFRAME , FRAME and LAYER tags. | | | escUrl = 2 (or 6) | | The result of a Perl expression is always URL-escaped (e.g., `&'
becomes `%26'). | | | escHtml = 1 (or 5) | | The result of a Perl expression is always HTML-escaped (e.g., `>'
becomes `>'). | | | escNode = 0 | | No escaping takes place. | | | escEscape = 4 | | If you add this value to the above Embperl will always perform the
escaping. Without it is possible to disable escaping by preceding the item that
normally is escaped with a backslash. While this is a handy thing, it could
be very dangerous in situations, where content that is inserted by some
user is redisplayed, because they can enter arbitrary HTML and precede them
with a backslash to avoid correct escaping when their input is redisplayed
again. | |
NOTE: You can localize $escmode inside a [+ +] block, e.g. to turn escaping
temporary off and output $data write [+ do { local $escmode = 0 ; $data } +]
| Env: | | EMBPERL_INPUT_ESCMODE | | | Method: | | $component -> config -> input_escmode [read only] | | | Default: | | 0 | | | Since: | | 2.0b6 | |
Tells Embperl how to handle escape sequences that are found in the source. | 0
| | don't interpret input (default) | | | 1
| | unescape html escapes to their characters (i.e. < becomes < )
inside of Perl code | | | 2
| | unescape url escapes to their characters (i.e. %26; becomes & )
inside of Perl code | | | 3
| | unescape html and url escapes, depending on the context | |
Add 4 to remove html tags inside of Perl code. This is helpful when
an html editor insert html tags like <br> inside your Perl code. Set EMBPERL_INPUT_ESCMODE to 7 to get the old default of Embperl < 2.0b6 Set EMBPERL_INPUT_ESCMODE to 0 to get the old behaviour when optRawInput was set.
| Env: | | EMBPERL_INPUT_CHARSET | | | Method: | | $component -> config -> input_charset | |
If set to the value "utf8" the source is interpreted as utf8 encoded so
you can use utf8 literals. It has the same effect as adding "use utf8"
to a normal Perl script.
| Env: | | EMBPERL_TOP_INCLUDE | | | Method: | | $component -> config -> top_include | | | Since: | | 2.0b10 | |
Give a pieces of code that is include at the very top of every file. Example: Embperl_Top_Include "use MY::Module;" This will cause MY::Module to be used in every page. Note that
Embperl_Top_Include must contain valid Perl code and must be
ended with a semicolon. NOTE: If you pass top_include as parameter to Execute it is
only used in case the code is compiled (or recompiled) and not cached.
| Env: | | EMBPERL_CACHE_KEY | | | Method: | | $component -> config -> cache_key [read only] | | | Since: | | 2.0b1 | |
literal string that is appended to the cache key
Embperl_Cache_Key_Options | top |
| Env: | | EMBPERL_CACHE_KEY_OPTIONS | | | Method: | | $component -> config -> cache_key_options [read only] | | | Default: | | all options set | | | Since: | | 2.0b1 | |
Tells Embperl how to create a key for caching of the output | ckoptPathInfo = 2 | | include the PathInfo into CacheKey | | | ckoptQueryInfo = 4 | | include the QueryInfo into CacheKey | | | ckoptDontCachePost = 8 | | don't cache POST requests (not yet implemented) | |
| Env: | | EMBPERL_EXPIRES_FUNC | | | Method: | | $component -> config -> expires_func [read only] | | | Since: | | 2.0b1 | |
Function that is called every time before data is taken from the cache.
If this function returns true, the data from the cache isn't used anymore,
but rebuilt. Function could be either a coderef (when passed to Execute), a name of a
subroutine or a string starting with "sub " in which case it is compiled
as anonymous subroutine. NOTE: If &EXPIRES is defined inside the page, it get evaluated before
the excecution of the page
Embperl_Cache_Key_Func | top |
| Env: | | EMBPERL_CACHE_KEY_FUNC | | | Method: | | $component -> config -> cache_key_func | | | Since: | | 2.0b1 | |
function that should be called when build a cache key. The result is
appended to the cache key.
| Env: | | EMBPERL_EXPIRES_IN | | | Method: | | $component -> config -> expires_in [read only] | | | Since: | | 2.0b1 | |
Time in seconds that the output should be cached. (0 = never, -1 = forever) NOTE: If $EXPIRES is set inside the page, it get evaluated before
the excecution of the page
Embperl_Expires_Filename | top |
| Env: | | EMBPERL_EXPIRES_FILENAME | | | Method: | | $component -> config -> expires_filename [read only] | | | Since: | | 2.0b8 | |
Cache should be expired when the given file is modified.
| Env: | | EMBPERL_SYNTAX | | | Method: | | $component -> config -> syntax | | | Default: | | Embperl | | | Since: | | 2.0b1 | |
Used to tell Embperl which syntax to use inside a page. Embperl comes with
the following syntaxes: | EmbperlHTML | | all the HTML tags that Embperl recognizes by default | | | EmbperlBlocks | | all the [ ] blocks that Embperl supports | | | Embperl | | (default; contains EmbperlHtml and EmbperlBlocks) | | | ASP | | <% %> and <%= %>, see perldoc Embperl::Syntax::ASP | | | SSI | | Server Side Includes, see perldoc Embperl::Syntax::SSI | | | Perl | | File contains pure Perl (similar to Apache::Registry), but
can be used inside EmbperlObject | | | Text | | File contains only Text, no actions are taken on the Text | | | Mail | | Defines the <mail:send> tag, for sending mail. This is an
example for a taglib, which could be a base for writing
your own taglib to extent the number of available tags | | | POD | | translates pod files to XML, which can be converted to
the desired output format by an XSLT transformation | | | RTF | | Can be used to process word processing documents in RTF format | |
You can get a description for each syntax if you type perldoc Embperl::Syntax::xxx where 'xxx' is the name of the syntax. You can also specify multiple syntaxes e.g. EMBPERL_SYNTAX "Embperl SSI"
Execute ({inputfile => '*', syntax => 'Embperl ASP'}) ; The 'syntax' metacommand allows you to switch the syntax or to
add or subtract syntaxes e.g. [$ syntax + Mail $] will add the Mail taglib so the <mail:send> tag is available after
this line. [$ syntax - Mail $] now the <mail:send> tag is unknown again [$ syntax SSI $] now you can only use SSI commands inside your page.
| Env: | | EMBPERL_RECIPE | | | Method: | | $component -> config -> recipe [read only] | | | Since: | | 2.0b4 | |
Tells Embperl which recipe to use to process this component
Embperl_Xsltstylesheet | top |
| Env: | | EMBPERL_XSLTSTYLESHEET | | | Method: | | $component -> config -> xsltstylesheet [read only] | | | Since: | | 2.0b5 | |
Tell the xslt processor which stylsheet to use.
| Env: | | EMBPERL_XSLTPROC | | | Method: | | $component -> config -> xsltproc [read only] | | | Default: | | depends on compiltime options | | | Since: | | 2.0b5 | |
Tells Embperl which xslt processor to use. Current libxslt and xalan
are supported by Embperl, but they must be compiled in to be available.
|