5
Configuration and calling
9
Embperl can operate in one of four modes:
15
The mostly used way is to use Embperl together with mod_perl and Apache.
16
This gives the best performance and the most possibilities.
20
When you want to run Embperl on a machine that doesn't have mod_perl, you
21
can run Embperl also as normal CGI script. Due to the overhead of CGI,
22
this mode is much slower. To get a better performance you should consider
23
using Embperl together with FastCGI. (http://www.fastcgi.com).
27
You can use Embperl also on the command line. This is usefull for generating
28
static content out of dynamic pages and can sometime be helpfull for testing.
30
=item Call it from other Perl programms
32
If you have your own application and want to use Embperl's capbilities you can
33
do so by calling Embperl::Execute. This allows to build your own application
34
logic and useing Embperl possibilites for rendering content.
41
To use Embperl under mod_perl you must have installed Apache and mod_perl on your system.
42
Then you add some directives to your F<httpd.conf> to load Embperl and add C<Embperl>
43
as the C<PerlHandler>. The following directives will cause all file with extetion F<epl>
44
to be handled by Embperl:
48
AddType text/html .epl
51
SetHandler perl-script
57
Another possibility is to have all files under a special location processed by Embperl:
61
Alias /embperl /path/to/embperl/eg
64
SetHandler perl-script
69
In this setup you should make sure that non Embperl files like images doesn't served
72
For B<mod_perl 2.0> you need addtionaly to load the dynamic object library of Embperl. This is
73
necessary so Embperl is loaded early enough to register the configuration directives
74
with Apache. After installing, search underneath your Perl site directory for the
75
library. On Unix it is mostly called F<Embperl.so> on Windows it is called C<Embperl.dll>.
76
Now add the following line to your httpd.conf B<before> any of the Embperl configuration
77
directives, but B<after> F<mod_perl.so> is loaded:
79
LoadModule embperl_module /path/to/perl/site/lib/Embperl/Embperl.so
81
To use I<Embperl::Object> you use the C<Embperl::Object> as C<PerlHandler>:
84
Embperl_AppName unique-name
85
Embperl_Object_Base base.htm
86
Embperl_UriMatch "\.htm.?|\.epl$"
87
SetHandler perl-script
88
PerlHandler Embperl::Object
92
Addtionaly you can setup other parameters for I<Embperl::Object>. If you do so
93
inside a container (like C<<Location>, <Directory>, <Files>>) you need to
94
set C<Embperl_AppName> to a unique-name (the actual value doesn't matter).
95
The C<Embperl_UriMatch> makes sure that only files of the requested type are
96
served by I<Embperl::Object>, while all others are served by Apache as usual.
98
For more information see: L<"perldoc Embperl::Object"|"EmbperlObject.pod">.
100
Embperl accepts a lot of configuration directives to customize it's behaviour. See the next
101
section for a description.
105
To use this mode you must copy B<embpcgi.pl> to your cgi-bin
106
directory. You can invoke it with the URL
107
http://www.domain.xyz/cgi-bin/embpcgi.pl/url/of/your/document.
109
The /url/of/your/document will be passed to Embperl by the web server.
110
Normal processing (aliasing, etc.) takes place before the URI makes it
113
If you are running the Apache httpd, you can also define
114
B<embpcgi.pl> as a handler for a specific file extension or
117
Example of Apache C<httpd.conf>:
119
<Directory /path/to/your/html/docs>
120
Action text/html /cgi-bin/embperl/embpcgi.pl
124
B<NOTE>: Via CGI Scripts it maybe possible to bypass some of the Apache setup. To avoid this
125
use L<Embperl_Allow> to restrict access to the files, which should be processed by Embperl.
127
For I<Embperl::Object> you have to use F<epocgi.pl> instead of F<embpcgi.pl>.
129
You can also run Embperl with B<FastCGI>, in this case use embpfastcgi.pl
130
as cgi script. You must have FCGI.pm installed.
135
Run Embperl from the comannd line use F<embpexec.pl> on unix and F<embpexec.bat> on windows:
138
B<embpexec.pl [options] htmlfile [query_string]>
140
B<embpexec.bat [options] htmlfile [query_string]>
146
The full pathname of the source file which should be processed by
149
=item B<query_string>
151
Optional. Has the same meaning as the environment variable
152
QUERY_STRING when invoked as a CGI script. That is, QUERY_STRING
153
contains everything following the first "?" in a URL. <query_string>
154
should be URL-encoded. The default is no query string.
164
Optional. Gives the filename to which the output is written. The
169
Optional. Gives the filename of the logfile. The default is
170
F</tmp/embperl.log> on unix and F<\embperl.log> on windows.
174
Optional. Specifies the level of debugging (what is written to the
175
log file). The default is nothing. See L<"EMBPERL_DEBUG"> for exact values.
179
See L<"EMBPERL_OPTIONS"> for option values.
183
Defines the syntax of the source. See See L<"EMBPERL_SYNTAX">
188
=head2 By calling Embperl::Execute (\%param)
191
C<Execute> can be used to call Embperl from your own modules/scripts (for example
192
from a Apache::Registry or CGI script) or from within another Embperl page to nest multiple
193
Embperl pages (for example to store a common header or
194
footer in a different file).
196
(See B<eg/x/Excute.pl> for more detailed examples)
198
When you want to use I<Embperl::Object> call C<Embperl::Object::Execute>, when you
199
want I<Embperl::Mail>, call C<Embperl::Mail::Execute>.
201
There are two forms you can use for calling Execute. A short form which only takes a
202
filename and optional additional parameters or a long form which
203
takes a hash reference as its argument.
205
Execute($filename, $p1, $p2, $pn) ;
207
This will cause Embperl to interpret the file with the name C<$filename> and, if specified, pass
208
any additional parameters in the array C<@param> (just like C<@_> in a Perl subroutine).
209
The above example could also be written in the long form:
211
Execute ({inputfile => $filename,
212
param => [$p1, $p2, $pn]}) ;
214
The possible items for hash of the long form are are descriped in the
215
configuration section and parameter section.
219
=head3 EXAMPLES for Execute:
221
# Get source from /path/to/your.html and
222
# write output to /path/to/output'
224
Embperl::Execute ({ inputfile => '/path/to/your.html',
225
outputfile => '/path/to/output'}) ;
228
# Get source from scalar and write output to stdout
229
# Don't forget to modify mtime if $src changes
231
$src = '<html><head><title>Page [+ $no +]</title></head>' ;
233
Embperl::Execute ({ inputfile => 'some name',
237
# Get source from scalar and write output to another scalar
239
my $src = '<html><head><title>Page [+ $no +]</title></head>' ;
242
Embperl::Execute ({ inputfile => 'another name',
250
# Include a common header in an Embperl page,
251
# which is stored in /path/to/head.html
253
[- Execute ('/path/to/head.html') -]
261
Configuration can be setup in different ways, depending how you run Embperl.
262
When you run under mod_perl, Embperl add a set of new configuration directives
263
to the Apache configuration, so you can set them in your F<httpd.conf>.
264
When you run Embperl as CGI it takes the configuration from environment variables.
265
For compatibility reason that
266
can also be turned on under mod_perl, by adding C<Embperl_UseEnv on> in your
267
F<httpd.conf>. When you call Embperl from another Perl programm, by calling
268
the C<Execute> function, you can pass your configuration along with other parameters
269
as a hash reference. If you pass C<use_env =< 1> als parameter Embperl will
270
also scan the environment for configuration informations. Last but not least
271
you can pass configuration informations as options when you run Embperl via
272
embpexec.pl from the command line. Some of the configuration options are
273
also setable inside the page via the Empberl objects and you can read the
274
current configuration from these objects.
276
You can not only pass configuration in different ways, there are also three different
277
contexts: I<Application>, I<Request> and I<Component>.
278
A application describes a
279
set of pages/files that belongs together and form the application. Application level
280
configuration are the same for all files that belongs to an application. These
281
configuration information need to be known before any request processing takes place,
282
so they can't be modified during a request. Every application has it's own name.
283
You can refer the configuration of an application, by simply setting the name
284
of the application to use.
286
Request level configuration information applies to one request, some of them must
287
be known before the request starts, some of them can still be modified during the request.
289
Configuration for components can be setup before the request, but can also be passed
290
as argument when you call the component via C<Execute>.
293
=head2 Embperl_Useenv
303
$application -> config -> use_env I<[read only]>
307
off unless runing as CGI script
316
Tells Embperl to scan the enviromemt for configuration settings.
318
=head2 use_redirect_env
324
$application -> config -> use_redirect_env I<[read only]>
328
off unless runing as CGI script
337
Tells Embperl to scan the enviromemt for configuration settings which has the
338
prefix C<REDIRECT_>. This is normaly the case when the request is not the main request,
341
=head2 Embperl_Appname
351
$application -> config -> app_name I<[read only]>
360
Specifies the name for an application. The name is basicly used to refer to this application
361
elsewhere in httpd.conf without the need to setup the parameters for the apllication again.
364
=head2 Embperl_App_Handler_Class
370
EMBPERL_APP_HANDLER_CLASS
374
$application -> config -> app_handler_class I<[read only]>
383
Embperl will call the C<init> method of the given class at the start of the request,
384
but after all request parameters are setup. This give the class a chance to
385
do any necessary computation and modify the request parameters, before the request
386
is actualy executed. See L<internationalization> for an example.
389
=head2 Embperl_Session_Handler_Class
395
EMBPERL_SESSION_HANDLER_CLASS
399
$application -> config -> session_handler_class I<[read only]>
416
Set the class that performs the Embperl session handling. This gives you
417
the possibility to implement your own session handling.
420
1.3.3 was C<HTML::Embperl::Session>, starting with 1.3.4 it is
421
C<Apache::SessionX>. To get the old session behaviour set it to
422
C<HTML::Embperl::Session>.
424
=head2 Embperl_Session_Args
434
$application -> config -> session_args I<[read only]>
447
List of arguments for Apache::Session classes
448
Arguments that contains spaces can be quoted.
451
EMBPERL_SESSION_ARGS "DataSource=dbi:mysql:session UserName=www 'Password=secret word'"
454
=head2 Embperl_Session_Classes
460
EMBPERL_SESSION_CLASSES
464
$application -> config -> session_classes I<[read only]>
477
Space separated list of object store and lock manager
478
(and optionally the serialization and id generating class)
479
for Apache::Session (see L<"Session handling">)
482
=head2 Embperl_Session_Config
488
EMBPERL_SESSION_CONFIG
492
$application -> config -> session_config I<[read only]>
496
given when running Makefile.PL of Apache::SessionX
509
Selects a session configuration from the configurations you have defined when running
510
I<Apache::SessionX>'s C<Makefile.PL>.
512
NOTE: Use either C<EMBPERL_SESSION_CONFIG> or C<EMBPERL_SESSION_ARGS> and C<EMBPERL_SESSION_CLASSES>
515
=head2 Embperl_Cookie_Name
525
$application -> config -> cookie_name I<[read only]>
542
Set the name that Embperl uses when it sends the cookie with the session id.
545
=head2 Embperl_Cookie_Domain
551
EMBPERL_COOKIE_DOMAIN
555
$application -> config -> cookie_domain I<[read only]>
572
Set the domain that Embperl uses for the cookie with the session id.
575
=head2 Embperl_Cookie_Path
585
$application -> config -> cookie_path I<[read only]>
602
Set the path that Embperl uses for the cookie with the session id.
605
=head2 Embperl_Cookie_Expires
611
EMBPERL_COOKIE_EXPIRES
615
$application -> config -> cookie_expires I<[read only]>
619
at the end of the session
632
Set the expiration date that Embperl uses for the cookie with the session id.
633
You can specify the full date or relativ values.
634
The following forms are all valid times:
636
+30s 30 seconds from now
637
+10m ten minutes from now
638
+1h one hour from now
639
-1d yesterday (i.e. "ASAP!")
642
+10y in ten years time
643
Thursday, 25-Apr-1999 00:40:33 GMT at the indicated time & date
646
=head2 Embperl_Cookie_Secure
652
EMBPERL_COOKIE_SECURE
656
$application -> config -> cookie_secure I<[read only]>
660
at the end of the session
673
Set the secure flag of cookie that Embperl uses for the session id. If set the
674
cookie will only be transfered over a secured connection.
686
$application -> config -> log I<[read only]>
690
Unix: /tmp/embperl.log Windows: /embperl.log
695
Gives the location of the log file. This will contain information
696
about what Embperl is doing. The amount of information depends on the
697
debug settings (see L<"EMBPERL_DEBUG"> below). The log output is intended to show what
698
your embedded Perl code is doing and to help debug it.
711
$application -> config -> debug
716
This is a bitmask which specifies what should be written to the log.
717
To specify multiple debugflags, simply add the values together.
718
You can give the value a decimal, octal (prefix 0) or hexadecimal (prefix 0x) value.
719
You can also use the constants defined in I<Embperl::Constant>.
720
The following values are defined:
724
=item dbgStd = 1 (0x1)
726
Show minimum information.
728
=item dbgMem = 2 (0x2)
730
Show memory and scalar value allocation.
732
=item dbgEval = 4 (0x4)
734
Show arguments to and results of evals.
736
=item dbgEnv = 16 (0x10)
738
List every request's environment variables.
740
=item dbgForm = 32 (0x20)
742
List posted form data.
744
=item dbgInput = 128 (0x80)
746
Show processing of HTML input tags.
748
=item dbgFlushOutput = 256 (0x100)
750
Flush Embperl's output after every write. This should only be set to
751
help debug Embperl crashes, as it drastically slows down Embperl's
754
=item dbgFlushLog = 512 (0x200)
756
Flush Embperl's logfile output after every write. This should only be
757
set to help debug Embperl crashes, as it drastically slows down
761
=item dbgLogLink = 8192 (0x2000)
763
This feature is not yet implemented in Embperl 2.0!
765
Inserts a link at the top of each page which can be used to view the
766
log for the current HTML file. See also L<"EMBPERL_VIRTLOG">.
771
EMBPERL_VIRTLOG /embperl/log.htm
773
<Location /embperl/log.htm>
774
SetHandler perl-script
779
=item dbgDefEval = 16384 (0x4000)
781
Shows every time new Perl code is compiled.
784
=item dbgHeadersIn = 262144 (0x40000)
786
Log all HTTP headers which are sent from and to the browser.
788
=item dbgShowCleanup = 524288 (0x80000)
790
Show every variable which is undef'd at the end of the request. For
791
scalar variables, the value before undef'ing is logged.
794
=item dbgSession = 2097152 (0x200000)
796
Enables logging of session transactions.
798
=item dbgImport = 4194304 (0x400000)
800
Show how subroutines are imported in other namespaces.
802
=item dbgOutput = 0x08000
804
Logs the process of converting the internal tree strcuture to plain text for output
806
=item dbgDOM = 0x10000
808
Logs things related to processing the internal tree data structure of documents
810
=item dbgRun = 0x20000
812
Logs things related to execution of a document
814
=item dbgBuildToken = 0x800000
816
Logs things related to creating the token tables for source parsing
818
=item dbgParse = 0x1000000
820
Logs the parseing of the source
822
=item dbgObjectSearch = 0x2000000
824
Shows how Embperl::Objects seraches sourcefiles
826
=item dbgCache = 0x4000000
828
Logs cache related things
830
=item dbgCompile = 0x8000000
832
Gives information about compiling the parsed source to Perl code
834
=item dbgXML = 0x10000000
836
Logs things related to XML processing
838
=item dbgXSLT = 0x20000000
840
Logs things related to XSLT processing
842
=item dbgCheckpoint = 0x40000000
844
Logs things related to checkpoints which are internaly used during execution.
845
This information is only usefull if you have a deep knowledge of Embperl
852
=head2 Embperl_Maildebug
862
$application -> config -> maildebug
871
Debug value pass to Net::SMTP.
874
=head2 Embperl_Mailhost
884
$application -> config -> mailhost
893
Specifies which host the mail related functions of Embperl uses as SMTP server.
896
=head2 Embperl_Mailhelo
906
$application -> config -> mailhelo
919
Specifies which host/domain all mailrealted function uses
920
in the HELO/EHLO command.
921
A reasonable default is normaly choosen by I<Net::SMTP>, but
922
depending on your installation it may neccessary to set it
926
=head2 Embperl_Mailfrom
936
$application -> config -> mailfrom
940
www-server@<server_name>
949
Specifies the email address that is used as sender all mailrelted function.
952
=head2 Embperl_Mail_Errors_To
958
EMBPERL_MAIL_ERRORS_TO
962
$application -> config -> mail_errors_to
967
If set all errors will be send to the email adress given.
970
=head2 Embperl_Mail_Errors_Limit
976
EMBPERL_MAIL_ERRORS_LIMIT
980
$application -> config -> mail_errors_limit I<[read only]>
989
Do not mail more then <num> errors. Set to 0 for no limit.
992
=head2 Embperl_Mail_Errors_Reset_Time
998
EMBPERL_MAIL_ERRORS_RESET_TIME
1002
$application -> config -> mail_errors_reset_time I<[read only]>
1011
Reset error counter if for <sec> seconds no error has occured.
1014
=head2 Embperl_Mail_Errors_Resend_Time
1020
EMBPERL_MAIL_ERRORS_RESEND_TIME
1024
$application -> config -> mail_errors_resend_time I<[read only]>
1033
Mail errors of <sec> seconds regardless of the error counter.
1036
=head2 Embperl_Object_Base
1046
$application -> config -> object_base I<[read only]>
1059
Name of the base page that Embperl::Objects searches for.
1062
=head2 Embperl_Object_App
1072
$application -> config -> object_app
1081
Filename of the application object that Embperl::Object searches for.
1082
The file should contain the Perl code for
1083
the application object. There must be no package name given (as the package is set
1084
by Embperl::Object) inside the file, but the @ISA should point to Embperl::App.
1085
If set this file is searched throught the same search path as any content file.
1086
After a successfull load the init method is called with the Embperl request object
1087
as parameter. The init method can change the parameters inside the request object
1088
to influence the current request.
1091
=head2 Embperl_Object_Addpath
1097
EMBPERL_OBJECT_ADDPATH
1101
$application -> config -> object_addpath
1110
Additional directories where Embperl::Object searches for pages.
1111
In F<httpd.conf> or as evironment variable directories are
1112
separated by C<;> (on Unix C<:> works also). The parameter for C<Execute> and
1113
the application object method expects/returns an array reference.
1115
B<always> appended to the searchpath.
1118
=head2 Embperl_Object_Stopdir
1124
EMBPERL_OBJECT_STOPDIR
1128
$application -> config -> object_stopdir
1137
Directory where Embperl::Object stops searching for the base page.
1140
=head2 Embperl_Object_Fallback
1146
EMBPERL_OBJECT_FALLBACK
1150
$application -> config -> object_fallback
1159
If the requested file is not found by Embperl::Object, the file given by C<EMBPERL_OBJECT_FALLBACK>
1160
is displayed instead. If C<EMBPERL_OBJECT_FALLBACK> isn't set a
1161
staus 404, NOT_FOUND is returned as usual. If the fileame given in
1162
C<EMBPERL_OBJECT_FALLBACK> doesn't contain a path, it is searched thru the same
1163
directories as C<EMBPERL_OBJECT_BASE>.
1166
=head2 Embperl_Object_Handler_Class
1172
EMBPERL_OBJECT_HANDLER_CLASS
1176
$application -> config -> object_handler_class
1185
If you specify this, the template base and the requested page inherit all
1186
methods from this class. This class must contain C<Embperl::Req> in his
1191
=head2 Embperl_Useenv
1201
$request -> config -> use_env I<[read only]>
1205
off unless runing as CGI script
1214
Tells Embperl to scan the enviromemt for configuration settings.
1216
=head2 use_redirect_env
1222
$request -> config -> use_redirect_env I<[read only]>
1226
off unless runing as CGI script
1235
Tells Embperl to scan the enviromemt for configuration settings which has the
1236
prefix C<REDIRECT_>. This is normaly the case when the request is not the main request,
1239
=head2 Embperl_Allow
1249
$request -> config -> allow I<[read only]>
1262
If specified, only files which match the given B<perl regular expression> will be
1263
processed by Embperl. All other files will return FORBIDDEN.
1264
This is especially useful in a CGI environment by making the server more secure.
1267
=head2 Embperl_Urimatch
1277
$request -> config -> urimatch I<[read only]>
1290
If specified, only files which match the given B<perl regular expression> will be
1291
processed by Embperl, all other files will be handled by the standard Apache
1292
handler. This can be useful if you have Embperl documents and non Embperl
1293
documents (e.g. gifs) residing in the same directory.
1296
# Only files which end with .htm will processed by Embperl
1297
EMBPERL_URIMATCH \.htm$
1300
=head2 Embperl_Multfieldsep
1306
EMBPERL_MULTFIELDSEP
1310
$request -> config -> mult_field_sep I<[read only]>
1323
Specifies the charachter that is used to separate multiple form values with the
1336
$request -> config -> path I<[read only]>
1345
Can contain a semicolon (also colon under Unix) separated file search path.
1346
When a file is processed and the filename isn't an absolute path or
1347
does not start with ./ (or .\ under windows), I<Embperl> searches all
1348
the specified directories for that file.
1351
A special handling is done if the filename starts with any number
1352
of C<../> i.e. refers to an upper directory. Then I<Embperl> strips
1353
the same number of entries at the start of the searchpath as the filename
1355
C<Execute> and the method of the request object expects/returns a array ref.
1357
=head2 Embperl_Debug
1367
$request -> config -> debug
1372
See application configuration for an describtion of possible values
1374
=head2 Embperl_Options
1384
$request -> config -> options
1393
This bitmask specifies some options for the execution of Embperl.
1394
To specify multiple options, simply add the values together.
1398
=item optDisableVarCleanup = 1
1400
Disables the automatic cleanup of variables at the end of each
1403
=item optDisableEmbperlErrorPage = 2
1405
Tells Embperl not to send its own errorpage in case of failure,
1406
but instead show as much of the page as possible. Errors are only logged
1408
Without this option, Embperl sends its
1409
own error page, showing all the errors which have occurred. If you
1410
have dbgLogLink enabled, every error will be a link to the
1411
corresponding location in the log file. This option has no effect if
1412
optReturnError is set.
1414
=item optReturnError = 262144
1416
With this option set, Embperl sends no output in case of an error.
1417
It returns the error back to Apache or the calling program. When running
1418
under mod_perl this gives you the chance to use the Apache I<ErrorDocument>
1419
directive to show a custom error-document. Inside the ErrorDocument
1420
you can retrieve the error messages with
1422
$errors = $req_rec -> prev -> pnotes('EMBPERL_ERRORS') ;
1424
where C<$errors> is a array reference. (1.3b5+)
1426
=item optShowBacktrace = 0x8000000
1428
When set every error message not only show the sourcefiles, but all files
1429
from which this file was called by Execute.
1434
=head2 Embperl_Output_Mode
1444
$request -> config -> output_mode
1457
Set the desired output format. 0 for HTML and 1 XML. If set to XML all tags
1458
that are generated by Embperl will contain a closing slash to conform to XML
1461
<input type="text" name="foo" />
1463
B<NOTE:> If you set output_mode to XML you should also change L<escmode> to XML escaping.
1466
=head2 Embperl_Session_Mode
1472
EMBPERL_SESSION_MODE
1476
$request -> config -> session_mode
1489
Specifies how the id for the session data is passed between requests.
1490
Possible values are:
1496
No session id will be passed
1498
=item smodeUDatCookie = 1
1500
The session id for the user session will be passed via cookie
1502
=item smodeUDatParam = 2
1504
The session id for the user session will append as parameter to any URL
1505
and inserted as a hidden field in any form.
1507
=item smodeUDatUrl = 4
1509
The session id for the user session will passed as a part of the URL.
1510
NOT YET IMPLEMENTED!!
1512
=item smodeSDatParam = 0x20
1514
The session id for the state session will append as parameter to any URL
1515
and inserted as a hidden field in any form.
1520
You may add the UDat and SDat values together to get both sorts of sessions,
1521
for example the value 0x21 will pass the id for the user session inside a
1522
cookie and the id for the state session as parameters.
1526
=head2 Embperl_Useenv
1536
$component -> config -> use_env I<[read only]>
1540
off unless runing as CGI script
1549
Tells Embperl to scan the enviromemt for configuration settings.
1551
=head2 use_redirect_env
1557
$component -> config -> use_redirect_env I<[read only]>
1561
off unless runing as CGI script
1570
Tells Embperl to scan the enviromemt for configuration settings which has the
1571
prefix C<REDIRECT_>. This is normaly the case when the request is not the main request,
1574
=head2 Embperl_Package
1584
$component -> config -> package
1589
The name of the package where your code will be executed. By default,
1590
Embperl generates a unique package name for every file. This ensures
1591
that variables and functions from one file do not conflict with those of
1592
another file. (Any package's variables will still be accessible with
1593
explicit package names.)
1595
=head2 Embperl_Debug
1605
$component -> config -> debug
1610
See application configuration for an describtion of possible values
1612
=head2 Embperl_Options
1622
$component -> config -> options
1627
This bitmask specifies some options for the execution of Embperl.
1628
To specify multiple options, simply add the values together.
1632
=item optDisableVarCleanup = 1
1634
Disables the automatic cleanup of variables at the end of each
1637
=item optDisableEmbperlErrorPage = 2
1639
Tells Embperl not to send its own errorpage in case of failure,
1640
but instead show as much of the page as possible. Errors are only logged
1642
Without this option, Embperl sends its
1643
own error page, showing all the errors which have occurred. If you
1644
have dbgLogLink enabled, every error will be a link to the
1645
corresponding location in the log file. This option has no effect if
1646
optReturnError is set.
1648
=item optReturnError = 262144
1650
With this option set, Embperl sends no output in case of an error.
1651
It returns the error back to Apache or the calling program. When running
1652
under mod_perl this gives you the chance to use the Apache I<ErrorDocument>
1653
directive to show a custom error-document. Inside the ErrorDocument
1654
you can retrieve the error messages with
1656
$errors = $req_rec -> prev -> pnotes('EMBPERL_ERRORS') ;
1658
where C<$errors> is a array reference. (1.3b5+)
1660
=item optShowBacktrace = 0x8000000
1662
When set every error message not only show the sourcefiles, but all files
1663
from which this file was called by Execute.
1666
=item optSafeNamespace = 4
1668
Tells Embperl to execute the embedded code in a safe namespace so the
1669
code cannot access data or code in any other package. (See the
1670
chapter about L<"(Safe-)Namespaces and opcode restrictions"> below for more details.)
1672
=item optOpcodeMask = 8
1674
Tells Embperl to apply an operator mask. This gives you the chance to
1675
disallow special (unsafe) opcodes. (See the Chapter about
1676
L<"(Safe-)Namespaces and opcode restrictions">
1677
below for more details.)
1679
=item optDisableFormData = 256
1681
This option disables the setup of %fdat and @Z<>ffld. Embperl will not do anything
1682
with the posted form data.
1683
Set this when using Execute from your perl script and you have already read the Form Data (via eg. CGI.pm).
1686
=item optAllFormData = 8192
1688
This option will cause Embperl to insert all formfields in %fdat and @Z<>ffld, even if they
1689
are empty. Empty formfields will be inserted with an empty string. Without this option,
1690
empty formfields will be absent from %fdat and @Z<>ffld.
1693
=item optRedirectStdout = 16384
1695
Redirects STDOUT to the Embperl output stream before every request and resets it afterwards.
1696
If set, you can use a normal Perl B<print> inside any Perl block to output data.
1697
Without this option you can only use output data by using the [+ ... +] block, or printing
1698
to the filehandle B<OUT>.
1701
=item optNoHiddenEmptyValue = 65536 (only 1.2b2 and above)
1703
Normally, if there is a value defined in %fdat for a specific input field, Embperl
1704
will output a hidden input element for it when you use B<hidden>. When this option
1705
is set, Embperl will not output a hidden input element for this field when the
1706
value is a blank string.
1709
=item optKeepSpaces = 1048576 (only 1.2b5 and above) = 0x100000,
1711
Disable the removal of spaces and empty lines from the output. This is useful
1712
for sources other than HTML.
1719
=head2 Embperl_Escmode
1729
$component -> config -> escmode
1738
Turn HTML and URL escaping on and off.
1740
NOTE: If you want to output binary data, you must set the escmode
1743
For convenience you can change the escmode inside a page by setting
1744
the variable C<$escmode>.
1749
=item escXML = 8 (or 15) (2.0b4 and above)
1751
The result of a Perl expression is always XML-escaped (e.g., `>'
1752
becomes `>' and ' become ').
1754
=item escUrl + escHtml = 3 (or 7)
1756
The result of a Perl expression is HTML-escaped (e.g., `>' becomes
1757
`>') in normal text and URL-escaped (e.g., `&' becomes `%26')
1758
within of C<A>, C<EMBED>, C<IMG>, C<IFRAME>, C<FRAME> and C<LAYER> tags.
1760
=item escUrl = 2 (or 6)
1762
The result of a Perl expression is always URL-escaped (e.g., `&'
1765
=item escHtml = 1 (or 5)
1767
The result of a Perl expression is always HTML-escaped (e.g., `>'
1772
No escaping takes place.
1776
If you add this value to the above Embperl will always perform the
1777
escaping. Without it is possible to disable escaping by preceeding the item that
1778
normaly is escaped with a backslash. While this is a handy thing, it could
1779
be very dangerous in situations, where content that is inserted by some
1780
user is redisplayed, because they can enter arbitary HTML and preceed them
1781
with a backslash to avoid correct escaping when their input is redisplayed
1786
NOTE: You can localize $escmode inside a [+ +] block, e.g. to turn escaping
1787
temporary off and output C<$data> write
1789
[+ do { local $escmode = 0 ; $data } +]
1792
=head2 Embperl_Input_Escmode
1798
EMBPERL_INPUT_ESCMODE
1802
$component -> config -> input_escmode I<[read only]>
1815
Tells Embperl how to handle escape sequences that are found in the source.
1821
don't interpret input (default)
1826
unescape html escapes to their characters (i.e. < becomes < )
1831
unescape url escapes to their characters (i.e. %26; becomes & )
1836
unescape html and url escapes, depending on the context
1840
Add 4 to remove html tags inside of Perl code. This is helpfull when
1841
an html editor insert html tags like <br> inside your Perl code.
1843
Set EMBPERL_INPUT_ESCMODE to 7 to get the old default of Embperl < 2.0b6
1845
Set EMBPERL_INPUT_ESCMODE to 0 to get the old behaviour when optRawInput was set.
1848
=head2 Embperl_Input_Charset
1854
EMBPERL_INPUT_CHARSET
1858
$component -> config -> input_charset
1863
NOT YET IMPLEMENTED!
1867
=head2 Embperl_Top_Include
1877
$component -> config -> top_include
1886
Give a pieces of code that is include at the very top of every file.
1890
Embperl_Top_Include "use MY::Module;"
1892
This will cause MY::Module to be used in every page. Note that
1893
Embperl_Top_Include must contain valid Perl code and must be
1894
ended with a semikolon.
1896
B<NOTE:> If you pass top_include as parameter to Execute it is
1897
only used in case the code is compiled (or recompiled) and not cached.
1900
=head2 Embperl_Cache_Key
1910
$component -> config -> cache_key I<[read only]>
1919
literal string that is appended to the cache key
1922
=head2 Embperl_Cache_Key_Options
1928
EMBPERL_CACHE_KEY_OPTIONS
1932
$component -> config -> cache_key_options I<[read only]>
1945
Tells Embperl how to create a key for caching of the output
1949
=item ckoptPathInfo = 2
1951
include the PathInfo into CacheKey
1953
=item ckoptQueryInfo = 4
1955
include the QueryInfo into CacheKey
1957
=item ckoptDontCachePost = 8
1959
don't cache POST requests (not yet implemented)
1964
=head2 Embperl_Expires_Func
1970
EMBPERL_EXPIRES_FUNC
1974
$component -> config -> expires_func I<[read only]>
1983
Function that is called every time before data is taken from the cache.
1984
If this funtion returns true, the data from the cache isn't used anymore,
1987
Function could be either a coderef (when passed to Execute), a name of a
1988
subroutine or a string starting with "sub " in which case it is compiled
1989
as anonymous subroutine.
1991
NOTE: If C<&EXPIRES> is defined inside the page, it get evaluated before
1992
the excecution of the page
1995
=head2 Embperl_Cache_Key_Func
2001
EMBPERL_CACHE_KEY_FUNC
2005
$component -> config -> cache_key_func
2014
function that should be called when build a cache key. The result is
2015
appended to the cache key.
2018
=head2 Embperl_Expires_In
2028
$component -> config -> expires_in I<[read only]>
2037
Time in seconds that the output should be cached. (0 = never, -1 = forever)
2039
NOTE: If C<$EXPIRES> is set inside the page, it get evaluated before
2040
the excecution of the page
2042
=head2 Embperl_Expires_Filename
2048
EMBPERL_EXPIRES_FILENAME
2052
$component -> config -> expires_filename I<[read only]>
2061
Cache should be expired when the given file is modified.
2063
=head2 Embperl_Syntax
2073
$component -> config -> syntax
2086
Used to tell Embperl which syntax to use inside a page. Embperl comes with
2087
the following syntaxes:
2094
all the HTML tags that Embperl recognizes by default
2098
all the [ ] blocks that Embperl supports
2102
(default; contains EmbperlHtml and EmbperlBlocks)
2106
<% %> and <%= %>, see perldoc Embperl::Syntax::ASP
2110
Server Side Includes, see perldoc Embperl::Syntax::SSI
2114
File contains pure Perl (similar to Apache::Registry), but
2115
can be used inside EmbperlObject
2119
File contains only Text, no actions are taken on the Text
2123
Defines the <mail:send> tag, for sending mail. This is an
2124
example for a taglib, which could be a base for writing
2125
your own taglib to extent the number of available tags
2129
translates pod files to XML, which can be converted to
2130
the desired output format by an XSLT transformation
2134
Can be used to process word processing documents in RTF format
2138
You can get a description for each syntax if you type
2140
perldoc Embperl::Syntax::xxx
2142
where 'xxx' is the name of the syntax.
2144
You can also specify multiple syntaxes e.g.
2146
EMBPERL_SYNTAX "Embperl SSI"
2148
Execute ({inputfile => '*', syntax => 'Embperl ASP'}) ;
2150
The 'syntax' metacommand allows to switch the syntax or to
2151
add or subtract syntaxes e.g.
2155
will add the Mail taglib so the <mail:send> tag is available after
2160
now the <mail:send> tag is unknown again
2164
now you can only use SSI commands inside your page.
2167
=head2 Embperl_Recipe
2177
$component -> config -> recipe I<[read only]>
2186
Tells Embperl which recipe to use to process this component
2188
=head2 Embperl_Xsltstylesheet
2194
EMBPERL_XSLTSTYLESHEET
2198
$component -> config -> xsltstylesheet I<[read only]>
2207
Tell the xslt processor which stylsheet to use.
2209
=head2 Embperl_Xsltproc
2219
$component -> config -> xsltproc I<[read only]>
2223
depends on compiltime options
2232
Tells Embperl which xslt processor to use. Current C<libxslt> and C<xalan>
2233
are supported by Embperl, but they must be compiled in to be available.
2238
Parameters gives addtionaly information about the current request
2239
or the execution of the current component. So we have two sorts of
2240
parameters I<Request> and I<Component> parameters. Request
2241
parameters are automaticly setup by Embperl with information
2242
Embperl takes from the current running enviroment. When
2243
Embperl is invoked via the C<Execute> function, you can pass any of
2244
the parameters to Execute. Component parameters mainly reflect
2245
the parameters given to C<Execute>.
2253
$request -> param -> filename
2262
Gives the filename of the file that was actualy requested.
2263
Inside of the applications C<init> function it can be changed
2264
to force Embperl to serve a different file.
2273
$request -> param -> unparsed_uri
2282
The full unparsed_uri, includeing the query_string and the path_info.
2290
$request -> param -> uri
2299
The decoded path of the unparsed_uri.
2307
$request -> param -> server_addr
2316
URL of the server of the current request in the form
2317
schema://addr:port/ e.g. http://perl.apache.org/ (port is omitted if it is
2326
$request -> param -> path_info
2335
The path_info, that is anything in the path after the file the is currently served.
2343
$request -> param -> query_info
2352
Any parameters passed in a GET request after the question mark. The hash
2353
C<%fdat> will contain these values in a already decoded and easy to use way.
2354
So it's normly more convenient to use C<%fdat> instead.
2362
$request -> param -> language
2371
The primary langange found in the browser C<Accept-Language> HTTP header.
2372
This value is used for all language dependend functions inside Embperl.
2373
You can set it change the selection of message returned by C<$request -> gettext>
2382
$request -> param -> cookies
2391
A hashref that contains all cookies send by the browser to the server.
2399
$component -> param -> inputfile I<[read only]>
2408
Give the name of the file that should be processed, e.g.
2410
Execute({inputfile => 'mysource.epl'}) ;
2412
There is a shortcut when you only need to give the input file
2413
and no other parameters. The above is will do the same as:
2415
Execute('mysource.epl') ;
2423
$component -> param -> outputfile I<[read only]>
2436
Specify a file to which the output should be written. Example:
2438
Execute({inputfile => 'mysource.epl',
2439
outputfile => 'myoutput.htm'}) ;
2448
$component -> param -> input I<[read only]>
2457
This parameter is used, when you have the source already in memory.
2458
You should pass a reference to a scalar that contains the source.
2459
Addtionaly you should give the L<inputfile> parameter, to allow
2460
Embperl caching to keep track of different in memory sources.
2461
The L<mtime> parameter is used to tell Embperl's cache if
2462
the source has change since the last call or not. If C<mtime>
2463
if C<undef> or of a different value as it was during the last
2464
call, the source is considered to be changed and everything
2465
is recompiled. Example:
2467
# Get source from scalar
2468
# Don't forget to modify mtime if $src changes
2470
$src = '<html><head><title>Page [+ $no +]</title></head>' ;
2472
Embperl::Execute ({ inputfile => 'some name',
2483
$component -> param -> output I<[read only]>
2492
Gives the possibility to write the output into a scalar
2493
instead of sending it to stdout or a file. You should give
2494
a reference to a scalar. Example:
2496
Execute({inputfile => 'mysource.epl',
2506
$component -> param -> sub I<[read only]>
2515
Call the given Embperl subroutine defined with C<[$sub$]> inside the page.
2516
A shortcut for this is to append the name of the subroutine after the
2517
filename with a hash sign, so the following calls are doing the same thing:
2519
Execute('mysource.epl#mysub') ;
2521
Execute({inputfile => 'mysource.epl',
2524
If you leave out the filename, the sub is called in the current file, so
2525
this can only be used inside a file that is already processed by Embperl.
2533
$component -> param -> subreq
2542
This utilizies Apache 2.0 filters to retrieve the output of a sub-request
2543
and uses it as input for the current component. For example if you have
2544
a CGI-Script and you need to post process it via Embperl or simply
2545
want to include it's output in another Embperl/Embperl::Object document
2548
[- Execute ({subreq => '/cgi-bin/script.cgi'}) -]
2550
B<NOTE:> You have to specify a URI and not a filename!
2558
$component -> param -> import I<[read only]>
2567
A value of one tells Embperl to define the subrountines inside the file (if not already
2568
done) and to import them as perl subroutines into the current namespace.
2570
See B<[$ sub $]> metacommand and section about subroutines for more info.
2572
A value of zero tells Embperl to simply precompile all code found in the page.
2573
(With 2.0 it is B<not> necessary anymore to do it before using the C<sub> parameter
2574
on a different file).
2582
$component -> param -> firstline I<[read only]>
2595
Specifies the first linenumber of the sourcefile.
2603
$component -> param -> mtime I<[read only]>
2616
Last modification time of parameter L<input>. If undef the code passed
2617
by input is always recompiled, else the code is only recompiled if
2626
$component -> param -> param I<[read only]>
2635
Can be used to pass parameters to the Embperl document and back. Must contain
2636
a reference to an array. Example:
2638
Execute({inputfile => 'mysource.epl',
2639
param => [1, 2, 3]}) ;
2640
Execute({inputfile => 'mysource.epl',
2641
param => \@parameters}) ;
2643
There is a shortcut, so the following code the aquivalent (NOTE: Don't use a
2646
Execute('mysource.epl', 1, 2, 3) ;
2647
Execute('mysource.epl', @parameters) ;
2650
The array C<@param> in the Embperl document is setup as an alias to the array.
2651
See F<eg/x/Excute.pl> for a more detailed example.
2659
$component -> param -> fdat I<[read only]>
2668
Pass a hash reference to customly set %fdat. If C<ffld> is not given, C<ffld> will
2669
be set to C<keys %fdat>.
2677
$component -> param -> ffld I<[read only]>
2686
Pass a array reference to customly set @fdat. Does not affect C<%fdat>.
2694
$component -> param -> object I<[read only]>
2703
Takes a filename and returns an hashref that is blessed into the package of
2704
the given file. That's usefull, if you want to call the subs inside the
2705
given file, as methods. By using the C<isa> parameter (see below) you
2706
are able to provide an inherence tree. Additionaly you can use the returned
2707
hashref to store data for that object. Example:
2709
[# the file eposubs.htm defines two subs: txt1 and txt2 #]
2710
[# first we create a new object #]
2711
[- $subs = Execute ({'object' => 'eposubs.htm'}) -]
2713
[# then we call methods inside the object #]
2714
txt1: [+ $subs -> txt1 +] <br>
2716
txt2: [+ $subs -> txt2 +] <br>
2725
$component -> param -> isa I<[read only]>
2734
Takes a name of a file and pushes the package of that file into the @ISA
2735
array of the current file. By using this you can setup an inherence tree
2736
between Embperl documents. Is is also usefull within I<Embperl::Object>.
2739
[! Execute ({'isa' => '../eposubs.htm'}) !]
2747
$component -> param -> errors I<[read only]>
2756
Takes a reference to an array. Upon return, the array will contain a copy of
2757
all errormessages, if any.
2765
$component -> param -> xsltparam
2778
Takes a reference to hash which contains key/value pair that are accessable inside
2779
the stylesheet via <xsl:param>.
2783
=head1 Embperl's Objects
2785
There are three major objects in Embperl: I<application>, I<request> and I<component>.
2786
Each of these objects can be used to get information about the processing and
2787
control the execution. Each of these objects has a config sub-object, which makes
2788
the configuration accessable and, where possible, changeable at runtime. The C<config>
2789
method of these three objects returns a reference to the configuation object. The methods
2790
of these configurations objects are described in the section L<Configuration>.
2791
The request and the component object have addtionaly a parameter sub-object, which holds
2792
parameters passed to the current request/component. The C<param> method of these two
2793
objects returns the parameter sub-object. The methods of these parameter objects
2794
can be found in the section L<Parameters>.
2795
Addtionaly each of the three major objects has a set of own methods, which are described
2804
$application -> thread I<[read only]>
2813
Returns a reference to a object which hold per threads informations. There is only one
2814
such object per thread.
2822
$application -> curr_req I<[read only]>
2831
Returns a reference to the current request object i.e. the object of the
2832
request currently running.
2840
$application -> config I<[read only]>
2849
Returns a reference to the configuration object of the application. See section L<Configuration>.
2857
$application -> user_session I<[read only]>
2866
Returns a reference to the user session object.
2868
=head2 state_session
2874
$application -> state_session I<[read only]>
2883
Returns a reference to the state session object.
2891
$application -> app_session I<[read only]>
2900
Returns a reference to the application session object.
2908
$application -> udat I<[read only]>
2917
Returns a reference to a hash which contains the data of the user session.
2918
This has can be used to access and modify user session data. It's the same
2919
as accessing the global L<%udat>.
2927
$application -> sdat I<[read only]>
2936
Returns a reference to a hash which contains the data of the state session.
2937
This has can be used to access and modify state session data. It's the same
2938
as accessing the global L<%sdat>.
2946
$application -> mdat I<[read only]>
2955
Returns a reference to a hash which contains the data of the application session.
2956
This has can be used to access and modify application session data. It's the same
2957
as accessing the global L<%mdat>.
2966
$application -> errors_count
2975
Contains the number of errors since last time send per mail. See also L<mail_errors_to>.
2977
=head2 errors_last_time
2983
$application -> errors_last_time
2992
Time when the last error has occured. See also L<mail_errors_to>.
2994
=head2 errors_last_send_time
3000
$application -> errors_last_send_time
3009
Time when the last mail with error messages was sent. See also L<mail_errors_to>.
3017
$request -> apache_req I<[read only]>
3026
Returns a reference to mod_perls Apache request object. In mod_perl 1 this is of
3027
type C<Apache::> in mod_perl 2 it's a C<Apache::RequestRec>.
3035
$request -> config I<[read only]>
3044
Returns a reference to the configuration object of the request. See section L<Configuration>.
3052
$request -> param I<[read only]>
3061
Returns a reference to the parameter object of the request. See section L<Parameters>.
3069
$request -> component I<[read only]>
3078
Returns a reference to the object of component currently running. See component methods below.
3086
$request -> app I<[read only]>
3095
Returns a reference to the object of application to which the current request belongs.
3096
See application methods above.
3105
$request -> thread I<[read only]>
3114
Returns a reference to a object which hold per threads informations. There is only one
3115
such object per thread.
3117
=head2 request_count
3123
$request -> request_count I<[read only]>
3132
Returns the number of request handled so far by this child process.
3140
$request -> request_time I<[read only]>
3149
Start time of the current request.
3157
$request -> session_mgnt I<[read only]>
3166
Set to true if session management is available.
3174
$request -> session_id I<[read only]>
3183
Combined id of current user and state session.
3185
=head2 session_state_id
3191
$request -> session_state_id I<[read only]>
3200
Id of the current state session as received by the browser, this
3201
means this method returns C<undef> for a new session.
3203
=head2 session_user_id
3209
$request -> session_user_id I<[read only]>
3218
Id of the current user session as received by the browser, this
3219
means this method returns C<undef> for a new session.
3227
$request -> had_exit I<[read only]>
3236
True if exit was called in one of the components processed so far.
3238
=head2 log_file_start_pos
3244
$request -> log_file_start_pos I<[read only]>
3253
File possition of the log file at the time when the request has started.
3270
True if there were any error during the request.
3287
Reference to an array which holds all error messages occured so far.
3304
Additional informations passed to the error handler when an error is reported.
3321
Additional informations passed to the error handler when an error is reported.
3329
$request -> lastwarn
3338
Last warning message.
3346
$request -> cleanup_vars
3355
Reference to an array which is filled with references to variables that should be
3356
cleaned up after the request. You can add your own variables that needs cleanup here,
3357
but you should never remove any variables from this array.
3359
=head2 cleanup_packages
3365
$request -> cleanup_packages
3374
Refernce to a hash which contains all packages that must be cleaned up after the request.
3382
$request -> initial_cwd I<[read only]>
3391
Working directory when the request started.
3399
$request -> messages
3408
Reference to an array of hashs of messages. This is used by Embperl to translate
3409
message into different languages. When a C<[= =]> block is processed or
3410
$request -> gettext is called, Embperl searches this array. It starts from the first
3411
element in the array (each element in the array must be a hashref) and tries to
3412
lookup the text for the given symbol in hash. When it fails it goes to the
3413
next array element. This way you can setup multiple translation tables that are search
3414
for the symbol. Example:
3420
'addsel1' => 'Klicken Sie auf die Kategorie zu der Sie etwas hinzufļæ½gen mļæ½chten:',
3421
'addsel2' => 'oder fļæ½gen Sie eine neue Kategorie hinzu. Bitte geben Sie die Beschreibung in so vielen Sprachen wie Ihnen mļæ½glich ein.',
3422
'addsel3' => 'Falls Sie die ļæ½bersetzung nicht wissen, lassen Sie das entsprechende Eingabefeld leer.',
3423
'addsel4' => 'Kategorie hinzufļæ½gen',
3427
'addsel1' => 'Click on the category for wich you want to add a new item:',
3428
'addsel2' => 'or add new category. Please enter the description in as much languages as possible.',
3429
'addsel3' => 'If you don\'t know the translation leave the corresponding input field empty.',
3430
'addsel4' => 'Add category',
3435
$lang = $request -> param -> language ;
3436
push @{$request -> messages}, $messages{$lang} ;
3437
push @{$request -> default_messages}, $messages{'en'} if ($lang ne 'en') ;
3439
C<$request -> param -> language> retrieves the language as given by the browser
3440
language-accept header (or set before in your program). Then it pushes the german
3441
or english messages hash onto the message array. Addtionaly it pushes the english
3442
messages on the default_messages array. Messages will be taken from this array
3443
if nothing can be found in the messages array.
3446
=head2 default_messages
3452
$request -> default_messages
3461
Reference to an array with default messages. Messages will be taken from this array
3462
if nothing can be found in the L<messages> array.
3471
$component -> config I<[read only]>
3480
Returns an reference to the configuration object of the component.
3488
$component -> param I<[read only]>
3497
Returns an reference to the parameter object of the component.
3505
$component -> req_running I<[read only]>
3514
True if Embperl is inside of the execution of the request.
3522
$component -> sub_req I<[read only]>
3531
True is this is not the outermost Embperl component, i.e. this component is
3532
called from within another component.
3540
$component -> inside_sub I<[read only]>
3549
True is we are inside a Embperl subroutine ([$ sub $] ... [$ endsub $])
3557
$component -> had_exit I<[read only]>
3566
True if the exit was called during the excution of the component.
3574
$component -> path_ndx I<[read only]>
3583
Tells Embperl how much parts of the L<path> should be ignored when searching
3592
$component -> cwd I<[read only]>
3601
Directory of the source file of the component.
3609
$component -> sourcefile I<[read only]>
3618
Source file of the component.
3627
$component -> syntax
3636
Syntax of the component
3645
$component -> prev I<[read only]>
3654
Previous component, e.g. the component which called this component.
3663
$component -> import_stash I<[read only]>
3672
While importing a component this is set to the stash to which symbols are imported.
3673
C<undef> during normal execution.
3681
$component -> exports
3690
Symbols that should be exported by this component.
3698
$component -> curr_package I<[read only]>
3707
Name of the package the component is executed in.
3725
Only valid during compile phase. Can used to retrive and modify the code
3726
Embperl is generating. See Embperl::Syntax for more details and Embperl::Syntax::RTF