richter 2005/07/24 22:56:15
Modified: . Embperl.pm
test/conf startup.pl
Log:
- added test for preloading of Embperl pages on startup
Revision Changes Path
1.201 +12 -10 embperl/Embperl.pm
Index: Embperl.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl.pm,v
retrieving revision 1.200
retrieving revision 1.201
diff -u -r1.200 -r1.201
--- Embperl.pm 17 Jun 2005 21:14:28 -0000 1.200
+++ Embperl.pm 25 Jul 2005 05:56:15 -0000 1.201
@@ -127,8 +127,10 @@
# when called inside a Embperl Request, Execute the component only
return Embperl::Req::ExecuteComponent ($_ep_param, @_) if ($req) ;
+ $_ep_param = { inputfile => $_ep_param, param => [EMAIL PROTECTED] if
(!ref $_ep_param) ;
+
local $req_rec ;
- if ($modperl)
+ if ($modperl && !exists ($_ep_param -> {req_rec}))
{
if ($modperlapi < 2)
{
@@ -139,17 +141,17 @@
$req_rec = Apache2::RequestUtil -> request ;
}
}
-
- my $rc ;
- if (!ref $_ep_param)
- {
- $rc = Embperl::Req::ExecuteRequest (undef, { inputfile =>
$_ep_param, param => [EMAIL PROTECTED]) ;
+ elsif (exists ($_ep_param -> {req_rec}) && defined ($_ep_param ->
{req_rec}))
+ {
+ $req_rec = $_ep_param -> {req_rec} ;
}
- else
+
+ my $_ep_rc ;
{
- $rc = Embperl::Req::ExecuteRequest (undef, $_ep_param) ;
+ $_ep_rc = Embperl::Req::ExecuteRequest (undef, $_ep_param) ;
}
- return $rc ;
+
+ return $_ep_rc ;
}
#######################################################################################
1.23 +1 -1 embperl/test/conf/startup.pl
Index: startup.pl
===================================================================
RCS file: /home/cvs/embperl/test/conf/startup.pl,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- startup.pl 22 Feb 2005 16:34:29 -0000 1.22
+++ startup.pl 25 Jul 2005 05:56:15 -0000 1.23
@@ -57,7 +57,7 @@
$testshare = "Shared Data" ;
$cp -> share ('$testshare') ;
-##Embperl::Execute ({ inputfile => "$ENV{EMBPERL_SRC}/test/html/div.htm",
import => 0, input_escmode => 7 }) ;
+Embperl::Execute ({ inputfile => "$cwd/test/html/div.htm", import => 0,
input_escmode => 7, req_rec => undef }) ;
1 ;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]