You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl-cvs@perl.apache.org by ri...@apache.org on 2002/02/10 22:26:17 UTC
cvs commit: embperl/xsbuilder/maps ep_function.map ep_structure.map ep_type.map
richter 02/02/10 13:26:17
Modified: . Tag: Embperl2c DOM.xs Embperl.pm Embperl.xs
epapinit.c epcgiinit.c epdat2.h epinit.c epmain.c
eppriv.h eppublic.h eputil.c test.pl
Embperl Tag: Embperl2c Object.pm Recipe.pm Syntax.pm
Embperl/Syntax Tag: Embperl2c EmbperlBlocks.pm
test/cmp Tag: Embperl2c varepvar.htm
test/conf Tag: Embperl2c httpd.conf.src startup.pl
xsbuilder/maps Tag: Embperl2c ep_function.map
ep_structure.map ep_type.map
Log:
localisation of texts
Revision Changes Path
No revision
No revision
1.1.2.24 +64 -29 embperl/DOM.xs
Index: DOM.xs
===================================================================
RCS file: /home/cvs/embperl/DOM.xs,v
retrieving revision 1.1.2.23
retrieving revision 1.1.2.24
diff -u -r1.1.2.23 -r1.1.2.24
--- DOM.xs 29 Jan 2002 09:13:46 -0000 1.1.2.23
+++ DOM.xs 10 Feb 2002 21:26:14 -0000 1.1.2.24
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: DOM.xs,v 1.1.2.23 2002/01/29 09:13:46 richter Exp $
+# $Id: DOM.xs,v 1.1.2.24 2002/02/10 21:26:14 richter Exp $
#
###################################################################################
@@ -60,13 +60,14 @@
PREINIT:
STRLEN l ;
char * s ;
+ tReq * r = CurrReq ;
PPCODE:
RETVAL = NULL ; /* avoid warning */
SvGETMAGIC_P4(sText) ;
s = SV2String (sText, l) ;
- Node_replaceChildWithCDATA (CurrApp, DomTree_self(pDomNode -> xDomTree), pDomNode -> xNode, CurrReq -> Component.nCurrRepeatLevel, s, l, (CurrReq -> Component.nCurrEscMode & 11)== 3?1 + (CurrReq -> Component.nCurrEscMode & 4):CurrReq -> Component.nCurrEscMode, 0) ;
- CurrReq -> Component.nCurrEscMode = CurrReq -> Component.Config.nEscMode ;
- CurrReq -> Component.bEscModeSet = -1 ;
+ Node_replaceChildWithCDATA (CurrApp, DomTree_self(pDomNode -> xDomTree), pDomNode -> xNode, r -> Component.nCurrRepeatLevel, s, l, (r -> Component.nCurrEscMode & 11)== 3?1 + (r -> Component.nCurrEscMode & 4):r -> Component.nCurrEscMode, 0) ;
+ r -> Component.nCurrEscMode = r -> Component.Config.nEscMode ;
+ r -> Component.bEscModeSet = -1 ;
/*SvREFCNT_inc (sText) ;*/
ST(0) = sText ;
XSRETURN(1) ;
@@ -80,13 +81,14 @@
PREINIT:
STRLEN l ;
char * s ;
+ tReq * r = CurrReq ;
PPCODE:
RETVAL = NULL ; /* avoid warning */
SvGETMAGIC_P4(sText) ;
s = SV2String (sText, l) ;
- Node_replaceChildWithCDATA (CurrApp, DomTree_self(xDomTree), xOldChild, CurrReq -> Component.nCurrRepeatLevel, s, l, (CurrReq -> Component.nCurrEscMode & 11)== 3?1 + (CurrReq -> Component.nCurrEscMode & 4):CurrReq -> Component.nCurrEscMode, 0) ;
- CurrReq -> Component.nCurrEscMode = CurrReq -> Component.Config.nEscMode ;
- CurrReq -> Component.bEscModeSet = -1 ;
+ Node_replaceChildWithCDATA (CurrApp, DomTree_self(xDomTree), xOldChild, r -> Component.nCurrRepeatLevel, s, l, (r -> Component.nCurrEscMode & 11)== 3?1 + (r -> Component.nCurrEscMode & 4):r -> Component.nCurrEscMode, 0) ;
+ r -> Component.nCurrEscMode = r -> Component.Config.nEscMode ;
+ r -> Component.bEscModeSet = -1 ;
/*SvREFCNT_inc (sText) ;*/
ST(0) = sText ;
XSRETURN(1) ;
@@ -99,18 +101,35 @@
PREINIT:
STRLEN l ;
char * s ;
+ tReq * r = CurrReq ;
PPCODE:
RETVAL = NULL ; /* avoid warning */
SvGETMAGIC_P4(sText) ;
s = SV2String (sText, l) ;
- Node_replaceChildWithCDATA (CurrApp, DomTree_self(CurrReq -> Component.xCurrDomTree), xOldChild, CurrReq -> Component.nCurrRepeatLevel, s, l, (CurrReq -> Component.nCurrEscMode & 11)== 3?1 + (CurrReq -> Component.nCurrEscMode & 4):CurrReq -> Component.nCurrEscMode, 0) ;
- CurrReq -> Component.nCurrEscMode = CurrReq -> Component.Config.nEscMode ;
- CurrReq -> Component.bEscModeSet = -1 ;
+ Node_replaceChildWithCDATA (r -> pApp, DomTree_self(r -> Component.xCurrDomTree), xOldChild, r -> Component.nCurrRepeatLevel, s, l, (r -> Component.nCurrEscMode & 11)== 3?1 + (r -> Component.nCurrEscMode & 4):r -> Component.nCurrEscMode, 0) ;
+ r -> Component.nCurrEscMode = r -> Component.Config.nEscMode ;
+ r -> Component.bEscModeSet = -1 ;
/*SvREFCNT_inc (sText) ;*/
ST(0) = sText ;
XSRETURN(1) ;
+void
+embperl_Node_iReplaceChildWithMsgId (xOldChild,sId)
+ int xOldChild
+ char * sId
+PREINIT:
+ STRLEN l ;
+ char * s ;
+ tReq * r = CurrReq ;
+PPCODE:
+ s = embperl_GetText (r, sId) ;
+ l = strlen (s) ;
+ Node_replaceChildWithCDATA (r -> pApp, DomTree_self(r -> Component.xCurrDomTree), xOldChild, r -> Component.nCurrRepeatLevel, s, l, (r -> Component.nCurrEscMode & 11)== 3?1 + (r -> Component.nCurrEscMode & 4):r -> Component.nCurrEscMode, 0) ;
+ r -> Component.nCurrEscMode = r -> Component.Config.nEscMode ;
+ r -> Component.bEscModeSet = -1 ;
+
+
SV *
embperl_Node_replaceChildWithUrlDATA (pDomNode,sText)
@@ -118,10 +137,11 @@
SV * sText
PREINIT:
SV * sRet ;
+ tReq * r = CurrReq ;
PPCODE:
RETVAL = NULL ; /* avoid warning */
SvGETMAGIC_P4(sText) ;
- sRet = Node_replaceChildWithUrlDATA (CurrReq, pDomNode -> xDomTree, pDomNode -> xNode, CurrReq -> Component.nCurrRepeatLevel, sText) ;
+ sRet = Node_replaceChildWithUrlDATA (r, pDomNode -> xDomTree, pDomNode -> xNode, r -> Component.nCurrRepeatLevel, sText) ;
ST(0) = sRet ;
XSRETURN(1) ;
@@ -132,10 +152,11 @@
SV * sText
PREINIT:
SV * sRet ;
+ tReq * r = CurrReq ;
PPCODE:
RETVAL = NULL ; /* avoid warning */
SvGETMAGIC_P4(sText) ;
- sRet = Node_replaceChildWithUrlDATA (CurrReq, CurrReq -> Component.xCurrDomTree, xOldChild, CurrReq -> Component.nCurrRepeatLevel, sText) ;
+ sRet = Node_replaceChildWithUrlDATA (r, r -> Component.xCurrDomTree, xOldChild, r -> Component.nCurrRepeatLevel, sText) ;
ST(0) = sRet ;
XSRETURN(1) ;
@@ -165,10 +186,11 @@
STRLEN nText ;
char * sT ;
tDomTree * pDomTree ;
+ tReq * r = CurrReq ;
CODE:
sT = SV2String (sText, nText) ;
pDomTree = DomTree_self(pParentNode -> xDomTree) ;
- Node_appendChild (CurrApp, pDomTree, pParentNode -> xNode, CurrReq -> Component.nCurrRepeatLevel, nType, 0, sT, nText, 0, 0, NULL) ;
+ Node_appendChild (r -> pApp, pDomTree, pParentNode -> xNode, r -> Component.nCurrRepeatLevel, nType, 0, sT, nText, 0, 0, NULL) ;
void
@@ -177,11 +199,12 @@
int xParent
int nType
SV * sText
+ tReq * r = CurrReq ;
CODE:
STRLEN nText ;
char * sT = SV2String (sText, nText) ;
tDomTree * pDomTree = DomTree_self(xDomTree) ;
- Node_appendChild (CurrApp, pDomTree, xParent, CurrReq -> Component.nCurrRepeatLevel, nType, 0, sT, nText, 0, 0, NULL) ;
+ Node_appendChild (r -> pApp, pDomTree, xParent, r -> Component.nCurrRepeatLevel, nType, 0, sT, nText, 0, 0, NULL) ;
char *
@@ -191,13 +214,14 @@
int bDeep
PREINIT:
char * sText ;
+ tReq * r = CurrReq ;
CODE:
- sText = Node_childsText (CurrApp, DomTree_self (xDomTree), xChild, CurrReq -> Component.nCurrRepeatLevel, 0, bDeep) ;
+ sText = Node_childsText (r -> pApp, DomTree_self (xDomTree), xChild, r -> Component.nCurrRepeatLevel, 0, bDeep) ;
RETVAL = sText?sText:"" ;
OUTPUT:
RETVAL
CLEANUP:
- StringFree (CurrApp, &sText) ;
+ StringFree (r -> pApp, &sText) ;
################################################################################
@@ -207,10 +231,12 @@
void
embperl_DomTree_iCheckpoint (nCheckpoint)
int nCheckpoint
+PREINIT:
+ tReq * r = CurrReq ;
CODE:
- CurrReq -> Component.nCurrEscMode = CurrReq -> Component.Config.nEscMode ;
- CurrReq -> Component.bEscModeSet = -1 ;
- DomTree_checkpoint (CurrReq, nCheckpoint) ;
+ r -> Component.nCurrEscMode = r -> Component.Config.nEscMode ;
+ r -> Component.bEscModeSet = -1 ;
+ DomTree_checkpoint (r, nCheckpoint) ;
void
embperl_DomTree_iDiscardAfterCheckpoint (nCheckpoint)
@@ -243,13 +269,14 @@
char * sT ;
char * sA ;
tDomTree * pDomTree ;
+ tReq * r = CurrReq ;
CODE:
sT = SV2String (sText, nText) ;
sA = SV2String (sAttr, nAttr) ;
pDomTree = DomTree_self (pDomNode -> xDomTree) ;
- Element_selfSetAttribut (CurrApp, pDomTree, Node_self (pDomTree, pDomNode -> xNode), CurrReq -> Component.nCurrRepeatLevel, sA, nAttr, sT, nText) ;
+ Element_selfSetAttribut (r -> pApp, pDomTree, Node_self (pDomTree, pDomNode -> xNode), r -> Component.nCurrRepeatLevel, sA, nAttr, sT, nText) ;
void
@@ -258,6 +285,8 @@
int xNode
SV * sAttr
SV * sText
+PREINIT:
+ tReq * r = CurrReq ;
CODE:
STRLEN nAttr ;
STRLEN nText ;
@@ -265,7 +294,7 @@
char * sA = SV2String (sAttr, nAttr) ;
tDomTree * pDomTree = DomTree_self (xDomTree) ;
- Element_selfSetAttribut (CurrApp, pDomTree, Node_self (pDomTree, xNode), CurrReq -> Component.nCurrRepeatLevel, sA, nAttr, sT, nText) ;
+ Element_selfSetAttribut (r -> pApp, pDomTree, Node_self (pDomTree, xNode), r -> Component.nCurrRepeatLevel, sA, nAttr, sT, nText) ;
@@ -278,11 +307,12 @@
STRLEN nAttr ;
char * sA ;
tDomTree * pDomTree ;
+ tReq * r = CurrReq ;
CODE:
sA = SV2String (sAttr, nAttr) ;
pDomTree = DomTree_self (pDomNode -> xDomTree) ;
- Element_selfRemoveAttribut (CurrApp, pDomTree, Node_self (pDomTree, pDomNode -> xNode), CurrReq -> Component.nCurrRepeatLevel, sA, nAttr) ;
+ Element_selfRemoveAttribut (r -> pApp, pDomTree, Node_self (pDomTree, pDomNode -> xNode), r -> Component.nCurrRepeatLevel, sA, nAttr) ;
void
@@ -290,12 +320,14 @@
int xDomTree
int xNode
SV * sAttr
+PREINIT:
+ tReq * r = CurrReq ;
CODE:
STRLEN nAttr ;
char * sA = SV2String (sAttr, nAttr) ;
tDomTree * pDomTree = DomTree_self (xDomTree) ;
- Element_selfRemoveAttribut (CurrApp, pDomTree, Node_self (pDomTree, xNode), CurrReq -> Component.nCurrRepeatLevel, sA, nAttr) ;
+ Element_selfRemoveAttribut (r -> pApp, pDomTree, Node_self (pDomTree, xNode), r -> Component.nCurrRepeatLevel, sA, nAttr) ;
################################################################################
@@ -310,12 +342,13 @@
PREINIT:
tDomTree * pDomTree ;
char * sAttrText = NULL ;
+ tReq * r = CurrReq ;
CODE:
pDomTree = DomTree_self (pAttr -> xDomTree) ;
- Attr_selfValue (CurrApp, pDomTree, Attr_self(pDomTree, pAttr -> xNode), CurrReq -> Component.nCurrRepeatLevel, &sAttrText) ;
- RETVAL = newSVpv (sAttrText, ArrayGetSize (CurrApp, sAttrText)) ;
- StringFree (CurrApp, &sAttrText) ;
+ Attr_selfValue (r -> pApp, pDomTree, Attr_self(pDomTree, pAttr -> xNode), r -> Component.nCurrRepeatLevel, &sAttrText) ;
+ RETVAL = newSVpv (sAttrText, ArrayGetSize (r -> pApp, sAttrText)) ;
+ StringFree (r -> pApp, &sAttrText) ;
OUTPUT:
RETVAL
@@ -324,6 +357,8 @@
embperl_Attr_iValue (xDomTree, xAttr)
int xDomTree
int xAttr
+PREINIT:
+ tReq * r = CurrReq ;
CODE:
tDomTree * pDomTree = DomTree_self (xDomTree) ;
char * sAttrText = NULL ;
@@ -332,9 +367,9 @@
/* lprintf (CurrReq, "xDomTree=%d, xAttr=%d pDomTree=%x\n", xDomTree, xAttr, pDomTree) ;*/
pAttr = Attr_self(pDomTree, xAttr) ;
- Attr_selfValue (CurrApp, pDomTree, pAttr , CurrReq -> Component.nCurrRepeatLevel, &sAttrText) ;
- RETVAL = newSVpv (sAttrText, ArrayGetSize (CurrApp, sAttrText)) ;
- StringFree (CurrApp, &sAttrText) ;
+ Attr_selfValue (r -> pApp, pDomTree, pAttr , r -> Component.nCurrRepeatLevel, &sAttrText) ;
+ RETVAL = newSVpv (sAttrText, ArrayGetSize (r -> pApp, sAttrText)) ;
+ StringFree (r -> pApp, &sAttrText) ;
OUTPUT:
RETVAL
1.118.4.86 +15 -4 embperl/Embperl.pm
Index: Embperl.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl.pm,v
retrieving revision 1.118.4.85
retrieving revision 1.118.4.86
diff -u -r1.118.4.85 -r1.118.4.86
--- Embperl.pm 6 Feb 2002 09:21:06 -0000 1.118.4.85
+++ Embperl.pm 10 Feb 2002 21:26:14 -0000 1.118.4.86
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: Embperl.pm,v 1.118.4.85 2002/02/06 09:21:06 richter Exp $
+# $Id: Embperl.pm,v 1.118.4.86 2002/02/10 21:26:14 richter Exp $
#
###################################################################################
@@ -37,6 +37,7 @@
$VERSION
$cwd
$req_rec
+ $importno
) ;
@@ -53,10 +54,20 @@
}
-bootstrap Embperl $VERSION;
-Boot ($VERSION) ;
-Init (defined(&Apache::server)?Apache -> server:undef, undef) ;
+if (!defined(&Embperl::Init))
+ {
+ bootstrap Embperl $VERSION;
+ Boot ($VERSION) ;
+ Init (defined(&Apache::server)?Apache -> server:undef, undef) if (!$importno);
+ }
+
+
+sub import
+ {
+ ApacheAddModule () if ($ENV{MOD_PERL}) ;
+ }
+
$cwd = Cwd::fastcwd();
1.29.4.44 +5 -0 embperl/Embperl.xs
Index: Embperl.xs
===================================================================
RCS file: /home/cvs/embperl/Embperl.xs,v
retrieving revision 1.29.4.43
retrieving revision 1.29.4.44
diff -u -r1.29.4.43 -r1.29.4.44
--- Embperl.xs 28 Jan 2002 20:28:34 -0000 1.29.4.43
+++ Embperl.xs 10 Feb 2002 21:26:14 -0000 1.29.4.44
@@ -28,6 +28,11 @@
RETVAL
+void
+embperl_ApacheAddModule ()
+
+
+
MODULE = Embperl::Req PACKAGE = Embperl::Req PREFIX = embperl_
int
1.1.2.15 +28 -20 embperl/epapinit.c
Index: epapinit.c
===================================================================
RCS file: /home/cvs/embperl/epapinit.c,v
retrieving revision 1.1.2.14
retrieving revision 1.1.2.15
diff -u -r1.1.2.14 -r1.1.2.15
--- epapinit.c 6 Feb 2002 09:21:07 -0000 1.1.2.14
+++ epapinit.c 10 Feb 2002 21:26:14 -0000 1.1.2.15
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epapinit.c,v 1.1.2.14 2002/02/06 09:21:07 richter Exp $
+# $Id: epapinit.c,v 1.1.2.15 2002/02/10 21:26:14 richter Exp $
#
###################################################################################*/
@@ -62,7 +62,7 @@
#undef EPCFG
#define EPCFG(STRUCT,TYPE,NAME,CFGNAME) \
- { "EMBPERL_"#CFGNAME, embperl_Apache_Config_##STRUCT##NAME, NULL, RSRC_CONF, TAKE1, "" },
+ { "EMBPERL_"#CFGNAME, embperl_Apache_Config_##STRUCT##NAME, NULL, RSRC_CONF | OR_OPTIONS, TAKE1, "" },
static char * embperl_Apache_Config_useenv (cmd_parms *cmd, tApacheDirConfig * pDirCfg, bool arg) ;
static void *embperl_create_dir_config(pool *p, char *d) ;
@@ -112,7 +112,14 @@
void embperl_ApacheAddModule ()
{
- ap_add_module (&embperl_module) ;
+ if (!ap_find_linked_module(__FILE__ /*'epapinit.c'*/))
+ {
+ fprintf(stderr, "add module") ;
+ ap_add_module (&embperl_module) ;
+ }
+ else
+ fprintf(stderr, "found module") ;
+
}
static void embperl_ApacheInit (server_rec *s, pool *p)
@@ -142,8 +149,7 @@
embperl_DefaultReqConfig (&cfg -> ReqConfig) ;
embperl_DefaultAppConfig (&cfg -> AppConfig) ;
embperl_DefaultComponentConfig (&cfg -> ComponentConfig) ;
- /*cfg -> bUseEnv = -1 ; */
- cfg -> bUseEnv = 1 ;
+ cfg -> bUseEnv = -1 ;
return cfg;
}
@@ -210,11 +216,9 @@
{
if(pDirCfg)
{
- SV * perlsv = pConfig -> _perlsv ;
- memcpy (pConfig, &pDirCfg -> AppConfig, sizeof (*pConfig)) ;
+ memcpy (&pConfig -> pPool + 1, &pDirCfg -> AppConfig.pPool + 1, sizeof (*pConfig) - ((tUInt8 *)(&pConfig -> pPool) - (tUInt8 *)pConfig) - sizeof (pConfig -> pPool)) ;
if (pDirCfg -> bUseEnv)
- embperl_GetCGIAppConfig (pThread, pPool, pConfig) ;
- pConfig -> _perlsv = perlsv ;
+ embperl_GetCGIAppConfig (pThread, pPool, pConfig, 0) ;
}
else
embperl_DefaultAppConfig (pConfig) ;
@@ -226,20 +230,18 @@
int embperl_GetApacheReqConfig (/*in*/ tApp * pApp,
/*in*/ tMemPool * pPool,
/*in*/ tApacheDirConfig * pDirCfg,
- /*out*/ tReqConfig * pReqConfig)
+ /*out*/ tReqConfig * pConfig)
{
if(pDirCfg)
{
- SV * perlsv = pReqConfig -> _perlsv ;
- memcpy (pReqConfig, &pDirCfg -> ReqConfig, sizeof (*pReqConfig)) ;
+ memcpy (&pConfig -> pPool + 1, &pDirCfg -> ReqConfig.pPool + 1, sizeof (*pConfig) - ((tUInt8 *)(&pConfig -> pPool) - (tUInt8 *)pConfig) - sizeof (pConfig -> pPool)) ;
if (pDirCfg -> bUseEnv)
- embperl_GetCGIReqConfig (pApp, pPool, pReqConfig) ;
- pReqConfig -> _perlsv = perlsv ;
+ embperl_GetCGIReqConfig (pApp, pPool, pConfig, 0) ;
}
else
- embperl_DefaultReqConfig (pReqConfig) ;
+ embperl_DefaultReqConfig (pConfig) ;
return ok ;
}
@@ -254,11 +256,9 @@
{
if(pDirCfg)
{
- SV * perlsv = pConfig -> _perlsv ;
- memcpy (pConfig, &pDirCfg -> ComponentConfig, sizeof (*pConfig)) ;
+ memcpy (&pConfig -> pPool + 1, &pDirCfg -> ComponentConfig.pPool + 1, sizeof (*pConfig) - ((tUInt8 *)(&pConfig -> pPool) - (tUInt8 *)pConfig) - sizeof (pConfig -> pPool)) ;
if (pDirCfg -> bUseEnv)
- embperl_GetCGIComponentConfig (pReq, pPool, pConfig) ;
- pConfig -> _perlsv = perlsv ;
+ embperl_GetCGIComponentConfig (pReq, pPool, pConfig, 0) ;
}
else
embperl_DefaultComponentConfig (pConfig) ;
@@ -275,12 +275,20 @@
{
+ char * p ;
+
pParam -> sFilename = r -> filename ;
pParam -> sUnparsedUri = r -> unparsed_uri ;
pParam -> sUri = r -> uri ;
pParam -> sPathInfo = r -> path_info ;
pParam -> sQueryInfo = r -> args ;
-
+ p = ep_pstrdup (pPool, ap_table_get (r -> headers_in, "Accept-Language")) ;
+ while (isspace(*p))
+ p++ ;
+ pParam -> sLanguage = p ;
+ while (isalpha(*p))
+ p++ ;
+ *p = '\0' ;
return ok ;
}
1.1.2.7 +23 -9 embperl/Attic/epcgiinit.c
Index: epcgiinit.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epcgiinit.c,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- epcgiinit.c 5 Feb 2002 09:04:03 -0000 1.1.2.6
+++ epcgiinit.c 10 Feb 2002 21:26:14 -0000 1.1.2.7
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epcgiinit.c,v 1.1.2.6 2002/02/05 09:04:03 richter Exp $
+# $Id: epcgiinit.c,v 1.1.2.7 2002/02/10 21:26:14 richter Exp $
#
###################################################################################*/
@@ -61,7 +61,7 @@
{ \
int rc ;\
char * arg = GetHashValueStr (aTHX_ pThread -> pEnvHash, "EMBPERL_"#CFGNAME, NULL) ; \
- if (arg) \
+ if (0) \
if ((rc = EvalRegEx (pApp, arg, "Configuration: EMBPERL_"#CFGNAME, &pConfig -> NAME)) != ok) \
return rc ; \
}
@@ -81,13 +81,15 @@
int embperl_GetCGIAppConfig (/*in*/ tThreadData * pThread,
/*in*/ tMemPool * pPool,
- /*out*/ tAppConfig * pConfig)
+ /*out*/ tAppConfig * pConfig,
+ /*in*/ bool bSetDefault)
{
eptTHX_
tApp * pApp = NULL ;
- embperl_DefaultAppConfig (pConfig) ;
+ if (bSetDefault)
+ embperl_DefaultAppConfig (pConfig) ;
#define EPCFG_APP
#include "epcfg.h"
@@ -99,14 +101,16 @@
int embperl_GetCGIReqConfig (/*in*/ tApp * pApp,
/*in*/ tMemPool * pPool,
- /*out*/ tReqConfig * pConfig)
+ /*out*/ tReqConfig * pConfig,
+ /*in*/ bool bSetDefault)
{
tThreadData * pThread = pApp -> pThread ;
eptTHX_
- embperl_DefaultReqConfig (pConfig) ;
+ if (bSetDefault)
+ embperl_DefaultReqConfig (pConfig) ;
#define EPCFG_REQ
#include "epcfg.h"
@@ -118,7 +122,8 @@
int embperl_GetCGIComponentConfig (/*in*/ tReq * pReq,
/*in*/ tMemPool * pPool,
- /*out*/ tComponentConfig * pConfig)
+ /*out*/ tComponentConfig * pConfig,
+ /*in*/ bool bSetDefault)
{
@@ -126,7 +131,8 @@
tThreadData * pThread = pApp -> pThread ;
eptTHX_
- embperl_DefaultComponentConfig (pConfig) ;
+ if (bSetDefault)
+ embperl_DefaultComponentConfig (pConfig) ;
#define EPCFG_COMPONENT
#include "epcfg.h"
@@ -145,12 +151,20 @@
{
tThreadData * pThread = pApp -> pThread ;
eptTHX_
-
+ char * p ;
+
pParam -> sFilename = GetHashValueStrDup (aTHX_ pPool, pThread -> pEnvHash, "PATH_TRANSLATED", "") ;
pParam -> sUnparsedUri = GetHashValueStrDup (aTHX_ pPool, pThread -> pEnvHash, "REQUEST_URI", "") ;
pParam -> sUri = GetHashValueStrDup (aTHX_ pPool, pThread -> pEnvHash, "SCRIPT_NAME", "") ;
pParam -> sPathInfo = GetHashValueStrDup (aTHX_ pPool, pThread -> pEnvHash, "PATH_INFO", "") ;
pParam -> sQueryInfo = GetHashValueStrDup (aTHX_ pPool, pThread -> pEnvHash, "QUERY_STRING", "") ;
+ p = GetHashValueStrDup (aTHX_ pPool, pThread -> pEnvHash, "HTTP_ACCEPT_LANGUAGE", "") ;
+ while (isspace(*p))
+ p++ ;
+ pParam -> sLanguage = p ;
+ while (isalpha(*p))
+ p++ ;
+ *p = '\0' ;
return ok ;
}
1.1.2.24 +10 -1 embperl/Attic/epdat2.h
Index: epdat2.h
===================================================================
RCS file: /home/cvs/embperl/Attic/epdat2.h,v
retrieving revision 1.1.2.23
retrieving revision 1.1.2.24
diff -u -r1.1.2.23 -r1.1.2.24
--- epdat2.h 7 Feb 2002 06:56:20 -0000 1.1.2.23
+++ epdat2.h 10 Feb 2002 21:26:14 -0000 1.1.2.24
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epdat2.h,v 1.1.2.23 2002/02/07 06:56:20 richter Exp $
+# $Id: epdat2.h,v 1.1.2.24 2002/02/10 21:26:14 richter Exp $
#
###################################################################################*/
@@ -70,6 +70,7 @@
{
SV * _perlsv ; /**< The perl reference to this structure */
+ tMemPool * pPool ; /**< pool for memorymanagement */
char * sPackage ;
unsigned bDebug ;
unsigned bOptions ;
@@ -93,6 +94,7 @@
typedef struct tReqConfig
{
SV * _perlsv ; /**< The perl reference to this structure */
+ tMemPool * pPool ; /**< pool for memorymanagement */
CV * pAllow ;
CV * pUriMatch ;
char cMultFieldSep ;
@@ -102,16 +104,19 @@
typedef struct tReqParam
{
SV * _perlsv ; /**< The perl reference to this structure */
+ tMemPool * pPool ; /**< pool for memorymanagement */
char * sFilename ;
char * sUnparsedUri ;
char * sUri ;
char * sPathInfo ;
char * sQueryInfo ;
+ char * sLanguage ; /**< Language for the current request */
} tReqParam ;
typedef struct tAppConfig
{
SV * _perlsv ; /**< The perl reference to this structure */
+ tMemPool * pPool ; /**< pool for memorymanagement */
char * sAppName ;
char * sSessionArgs ;
char * sSessionClasses ;
@@ -141,6 +146,7 @@
typedef struct tComponentParam
{
SV * _perlsv ; /**< The perl reference to this structure */
+ tMemPool * pPool ; /**< pool for memorymanagement */
char * sInputfile ;
char * sOutputfile ;
SV * pInput ;
@@ -366,6 +372,9 @@
HV * pCleanupPackagesHV ; /* packages that should be cleaned up at end of request */
char * sInitialCWD ; /**< Reset directory to */
+
+ AV * pMessages ;
+ AV * pDefaultMessages ;
/* --- for statistics --- */
1.1.2.26 +13 -5 embperl/Attic/epinit.c
Index: epinit.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epinit.c,v
retrieving revision 1.1.2.25
retrieving revision 1.1.2.26
diff -u -r1.1.2.25 -r1.1.2.26
--- epinit.c 6 Feb 2002 09:21:07 -0000 1.1.2.25
+++ epinit.c 10 Feb 2002 21:26:14 -0000 1.1.2.26
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epinit.c,v 1.1.2.25 2002/02/06 09:21:07 richter Exp $
+# $Id: epinit.c,v 1.1.2.26 2002/02/10 21:26:14 richter Exp $
#
###################################################################################*/
@@ -274,13 +274,14 @@
pApp -> pPerlTHX = aTHX ;
#endif
pApp -> pPool = pPool ;
+ pCfg -> pPool = pPool ;
#ifdef APACHE
if (pApacheCfg)
embperl_GetApacheAppConfig (pThread, pPool, pApacheCfg, &pApp -> Config) ;
else
#endif
- embperl_GetCGIAppConfig (pThread, pPool, &pApp -> Config) ;
+ embperl_GetCGIAppConfig (pThread, pPool, &pApp -> Config, 1) ;
SetHashValueInt (NULL, pThread -> pApplications, sAppName, (IV)pApp) ;
@@ -893,6 +894,8 @@
r -> pPerlTHX = aTHX ;
#endif
r -> pPool = pPool ;
+ pConfig -> pPool = pPool ;
+ pParam -> pPool = pPool ;
r -> startclock = clock () ;
r -> stsv_count = sv_count ;
@@ -924,7 +927,7 @@
else
#endif
{
- embperl_GetCGIReqConfig (pApp, pPool, &r -> Config) ;
+ embperl_GetCGIReqConfig (pApp, pPool, &r -> Config, 1) ;
embperl_GetCGIReqParam (pApp, pPool, &r -> Param) ;
}
@@ -950,7 +953,8 @@
r -> pDomTreeAV = newAV () ;
r -> pCleanupAV = newAV () ;
r -> pCleanupPackagesHV = newHV () ;
-
+ r -> pMessages = newAV () ;
+ r -> pDefaultMessages = newAV () ;
/*
int nSessionMgnt ;
@@ -1329,6 +1333,10 @@
r -> Component.pPrev = pPrev ;
+ c -> pPool = r -> pPool ;
+ pParam -> pPool = r -> pPool ;
+ pConfig -> pPool = r -> pPool ;
+
c -> Param.nImport = -1 ;
c -> Param.nFirstLine = 1 ;
@@ -1341,7 +1349,7 @@
else
#endif
{
- embperl_GetCGIComponentConfig (r, r -> pPool, &c -> Config) ;
+ embperl_GetCGIComponentConfig (r, r -> pPool, &c -> Config, 1) ;
}
if (pPerlParam && SvROK(pPerlParam))
1.75.4.97 +2 -3 embperl/epmain.c
Index: epmain.c
===================================================================
RCS file: /home/cvs/embperl/epmain.c,v
retrieving revision 1.75.4.96
retrieving revision 1.75.4.97
diff -u -r1.75.4.96 -r1.75.4.97
--- epmain.c 6 Feb 2002 09:21:07 -0000 1.75.4.96
+++ epmain.c 10 Feb 2002 21:26:14 -0000 1.75.4.97
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epmain.c,v 1.75.4.96 2002/02/06 09:21:07 richter Exp $
+# $Id: epmain.c,v 1.75.4.97 2002/02/10 21:26:14 richter Exp $
#
###################################################################################*/
@@ -1226,7 +1226,6 @@
PUSHMARK(sp);
XPUSHs(r -> _perlsv);
- XPUSHs(&sv_undef) ; /*sv_2mortal(newRV_inc((SV *)pRP))); */
XPUSHs(pRecipe);
PUTBACK;
num = perl_call_pv ("Embperl::Recipe::GetRecipe", G_SCALAR | G_EVAL) ;
@@ -1462,7 +1461,7 @@
{
if (c -> Param.pOutput)
OutputToMem (r) ;
- else if (c -> pOutput == r -> Component.pPrev -> pOutput)
+ else if (r -> Component.pPrev && c -> pOutput == r -> Component.pPrev -> pOutput)
AppendToUpperTree (r) ;
else
OutputToFile (r) ;
1.1.2.14 +7 -4 embperl/Attic/eppriv.h
Index: eppriv.h
===================================================================
RCS file: /home/cvs/embperl/Attic/eppriv.h,v
retrieving revision 1.1.2.13
retrieving revision 1.1.2.14
diff -u -r1.1.2.13 -r1.1.2.14
--- eppriv.h 28 Jan 2002 20:28:34 -0000 1.1.2.13
+++ eppriv.h 10 Feb 2002 21:26:15 -0000 1.1.2.14
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: eppriv.h,v 1.1.2.13 2002/01/28 20:28:34 richter Exp $
+# $Id: eppriv.h,v 1.1.2.14 2002/02/10 21:26:15 richter Exp $
#
###################################################################################*/
@@ -186,13 +186,16 @@
char * embperl_GetCGIAppName (/*in*/ tThreadData * pThread) ;
int embperl_GetCGIAppConfig (/*in*/ tThreadData * pThread,
/*in*/ tMemPool * pPool,
- /*out*/ tAppConfig * pConfig) ;
+ /*out*/ tAppConfig * pConfig,
+ /*in*/ bool bSetDefault) ;
int embperl_GetCGIReqConfig (/*in*/ tApp * pApp,
/*in*/ tMemPool * pPool,
- /*out*/ tReqConfig * pConfig) ;
+ /*out*/ tReqConfig * pConfig,
+ /*in*/ bool bSetDefault) ;
int embperl_GetCGIComponentConfig (/*in*/ tReq * pReq,
/*in*/ tMemPool * pPool,
- /*out*/ tComponentConfig * pConfig) ;
+ /*out*/ tComponentConfig * pConfig,
+ /*in*/ bool bSetDefault) ;
int embperl_GetCGIReqParam (/*in*/ tApp * pApp,
/*in*/ tMemPool * pPool,
/*out*/ tReqParam * pParam) ;
1.1.2.8 +6 -1 embperl/Attic/eppublic.h
Index: eppublic.h
===================================================================
RCS file: /home/cvs/embperl/Attic/eppublic.h,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -u -r1.1.2.7 -r1.1.2.8
--- eppublic.h 28 Jan 2002 20:28:34 -0000 1.1.2.7
+++ eppublic.h 10 Feb 2002 21:26:15 -0000 1.1.2.8
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: eppublic.h,v 1.1.2.7 2002/01/28 20:28:34 richter Exp $
+# $Id: eppublic.h,v 1.1.2.8 2002/02/10 21:26:15 richter Exp $
#
###################################################################################*/
@@ -44,6 +44,11 @@
int embperl_ExecuteComponent(tReq * r,
SV * pPerlParam) ;
+
+
+char * embperl_GetText (tReq * r,
+ const char * sMsgId) ;
+
#define ERRDATLEN 1024
1.15.4.41 +54 -2 embperl/eputil.c
Index: eputil.c
===================================================================
RCS file: /home/cvs/embperl/eputil.c,v
retrieving revision 1.15.4.40
retrieving revision 1.15.4.41
diff -u -r1.15.4.40 -r1.15.4.41
--- eputil.c 6 Feb 2002 18:22:32 -0000 1.15.4.40
+++ eputil.c 10 Feb 2002 21:26:15 -0000 1.15.4.41
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: eputil.c,v 1.15.4.40 2002/02/06 18:22:32 richter Exp $
+# $Id: eputil.c,v 1.15.4.41 2002/02/10 21:26:15 richter Exp $
#
###################################################################################*/
@@ -1590,7 +1590,7 @@
{
int n = strcspn (sData, sSeparator) ;
if (n > 0)
- av_push (pAV, newSVpv(sData, n)) ;
+ av_push (pAV, newSVpv((char *)sData, n)) ;
sData += n + 1 ;
}
@@ -1600,6 +1600,58 @@
+/* ---------------------------------------------------------------------------- */
+/* */
+/* Seach message for id */
+/* */
+/* ---------------------------------------------------------------------------- */
+
+static char * embperl_GetText1 (/*in*/ tReq * r,
+ /*in*/ const char * sMsgId,
+ /*in*/ AV * arr)
+
+ {
+ epTHX_
+ IV len ;
+ IV i ;
+ char * pMsg ;
+
+ if (!arr || SvTYPE(arr) != SVt_PVAV)
+ return NULL ;
+
+ len = av_len(arr);
+ for (i = len; i >= 0; i--)
+ {
+ SV * * pHVREF = av_fetch(arr, i, 0);
+ if (pHVREF && *pHVREF && SvROK (*pHVREF))
+ {
+ HV * pHV = (HV *)SvRV (*pHVREF) ;
+ if (SvTYPE (pHV) != SVt_PVHV)
+ continue ;
+
+ if ((pMsg = GetHashValueStr (aTHX_ pHV, sMsgId, NULL)))
+ return pMsg ;
+ }
+ }
+ return NULL ;
+ }
+
+
+char * embperl_GetText (/*in*/ tReq * r,
+ /*in*/ const char * sMsgId)
+
+ {
+ epTHX_
+ char * pMsg ;
+
+ if (pMsg = embperl_GetText1(r, sMsgId, r -> pMessages))
+ return pMsg ;
+
+ if (pMsg = embperl_GetText1(r, sMsgId, r -> pDefaultMessages))
+ return pMsg ;
+
+ return sMsgId ;
+ }
1.70.4.113 +2 -2 embperl/test.pl
Index: test.pl
===================================================================
RCS file: /home/cvs/embperl/test.pl,v
retrieving revision 1.70.4.112
retrieving revision 1.70.4.113
diff -u -r1.70.4.112 -r1.70.4.113
--- test.pl 6 Feb 2002 09:21:07 -0000 1.70.4.112
+++ test.pl 10 Feb 2002 21:26:15 -0000 1.70.4.113
@@ -11,7 +11,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: test.pl,v 1.70.4.112 2002/02/06 09:21:07 richter Exp $
+# $Id: test.pl,v 1.70.4.113 2002/02/10 21:26:15 richter Exp $
#
###################################################################################
@@ -2271,7 +2271,7 @@
print "\n\nStarting httpd... " ;
unlink "$tmppath/httpd.pid" ;
chmod 0666, $logfile ;
- $XX = $opt_multchild?'':'-X' ;
+ $XX = $opt_multchild && !($opt_gdb || $opt_ddd)?'':'-X' ;
if ($EPWIN32)
No revision
No revision
1.1.2.6 +50 -30 embperl/Embperl/Attic/Object.pm
Index: Object.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Attic/Object.pm,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- Object.pm 6 Feb 2002 18:22:33 -0000 1.1.2.5
+++ Object.pm 10 Feb 2002 21:26:16 -0000 1.1.2.6
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: Object.pm,v 1.1.2.5 2002/02/06 18:22:33 richter Exp $
+# $Id: Object.pm,v 1.1.2.6 2002/02/10 21:26:16 richter Exp $
#
###################################################################################
@@ -157,6 +157,8 @@
my ($rc, $r) = Embperl::Req::InitRequest ($req -> {req_rec}, $req) ;
return $rc if ($rc) ;
+ use Data::Dumper ;
+ warn Dumper ($rc, $r) ;
my $cwd ;
my $filename = norm_path ($r -> param -> filename, $cwd) ;
@@ -258,18 +260,6 @@
my $basepackage = $packages{$fn} ;
- if (!-f $filename && exists $req -> {object_fallback})
- {
- $fallback = 1 ;
- $filename = $req -> {object_fallback} ;
- print Embperl::LOG "[$$]Embperl::Object use fallback: $filename\n" if ($debug);
- }
-
- if ($fn eq $filename)
- {
- $r -> logerror (Embperl::Constant::rcForbidden, $filename, $apr) ;
- return FORBIDDEN ;
- }
my $package = $req -> {'package'} || $packages{$filename} ;
@@ -293,6 +283,53 @@
$r -> config -> path (\@searchpath) ;
+ if ($req -> {object_app})
+ {
+ my $appfn = $req -> {object_app} ;
+ print Embperl::LOG "[$$]Embperl::Object import new Application: $appfn\n" if ($debug);
+
+ my $cparam = {object => $appfn, syntax => 'Perl'} ;
+ my $c = $r -> setup_component ($cparam) ;
+ my $app = $c -> run ;
+ my $package = $packages{"$fn::$appfn"} = $c -> curr_package ;
+ $c -> cleanup ;
+ print Embperl::LOG "[$$]Embperl::Object import new Application finished: $fn, package = $package\n" if ($debug);
+
+ #return 500 if (!$app) ;
+
+ no strict ;
+ if (!@{"$package\:\:ISA"})
+ {
+ @{"$package\:\:ISA"} = ("Embperl::App") if ($package ne $basepackage) ;
+ }
+ use strict ;
+
+ $app = $r -> app ;
+ bless $app, $package ;
+
+ my $status = $app -> init ($r) ;
+ if ($status)
+ {
+ $r -> cleanup ;
+ return $status ;
+ }
+ $filename = norm_path ($r -> param -> filename, $cwd) ;
+ }
+
+ if (!-f $filename && exists $req -> {object_fallback})
+ {
+ $fallback = 1 ;
+ $filename = $req -> {object_fallback} ;
+ print Embperl::LOG "[$$]Embperl::Object use fallback: $filename\n" if ($debug);
+ }
+
+ if ($fn eq $filename)
+ {
+ $r -> logerror (Embperl::Constant::rcForbidden, $filename, $apr) ;
+ return FORBIDDEN ;
+ }
+
+
if (!$package || $fallback)
{
print Embperl::LOG "[$$]Embperl::Object import new file: $filename\n" if ($debug && !$fallback);
@@ -314,23 +351,6 @@
$r -> param -> filename ($filename) if ($filename ne $fn) ;
bless $r, $package ;
-
- if (0) #$req -> {object_app})
- {
- my $app = Embperl::Req::ExecuteComponent ($r, {'object' => $req -> {object_app},
- 'syntax' => 'Perl',
- 'param' => [$req],
- 'debug' => $req -> {debug},
- 'reqfilename'=> $filename,
- }) ;
-
- return 500 if (!$app) ;
-
- $req -> {application} = $app ;
-
- my $status = $app -> new ($req) ;
- return $status if ($status) ;
- }
my $cparam = {%$req, inputfile => $fn } ;
my $c = $r -> setup_component ($cparam) ;
1.1.2.11 +6 -9 embperl/Embperl/Attic/Recipe.pm
Index: Recipe.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Attic/Recipe.pm,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.11
diff -u -r1.1.2.10 -r1.1.2.11
--- Recipe.pm 22 Jan 2002 09:29:55 -0000 1.1.2.10
+++ Recipe.pm 10 Feb 2002 21:26:16 -0000 1.1.2.11
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: Recipe.pm,v 1.1.2.10 2002/01/22 09:29:55 richter Exp $
+# $Id: Recipe.pm,v 1.1.2.11 2002/02/10 21:26:16 richter Exp $
#
###################################################################################
@@ -32,7 +32,7 @@
sub GetRecipe
{
- my ($r, $param, $name) = @_ ;
+ my ($r, $name) = @_ ;
$name ||= 'Embperl' ;
my @names = split (/\s/, $name) ;
@@ -56,7 +56,8 @@
}
$Recipes{$recipe} = $mod ;
}
- my $obj = $mod -> new ($r, $recipe, $param) ;
+ print Embperl::LOG "[$$] Use Recipe $recipe\n" if ($r -> component -> config -> debug) ;
+ my $obj = $mod -> new ($r, $recipe) ;
return $obj if ($obj) ;
}
@@ -104,7 +105,7 @@
To do so you have to create a class that provides a C<new> method which returns
a hash that contains the description what to do.
-=head2 new ($class, $r, $recipe, $param)
+=head2 new ($class, $r, $recipe)
=over 4
@@ -121,10 +122,6 @@
The name of the recipe
-=item $param
-
-The parameters the user passed to Execute.
-
=back
The function must return a hash that describes the desired action.
@@ -375,7 +372,7 @@
sub new
{
- my ($class, $r, $recipe, $param) = @_ ;
+ my ($class, $r, $recipe) = @_ ;
my $self =
{
1.1.4.54 +3 -1 embperl/Embperl/Attic/Syntax.pm
Index: Syntax.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Attic/Syntax.pm,v
retrieving revision 1.1.4.53
retrieving revision 1.1.4.54
diff -u -r1.1.4.53 -r1.1.4.54
--- Syntax.pm 5 Feb 2002 09:04:05 -0000 1.1.4.53
+++ Syntax.pm 10 Feb 2002 21:26:16 -0000 1.1.4.54
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: Syntax.pm,v 1.1.4.53 2002/02/05 09:04:05 richter Exp $
+# $Id: Syntax.pm,v 1.1.4.54 2002/02/10 21:26:16 richter Exp $
#
###################################################################################
@@ -331,6 +331,7 @@
compiletimeperlcode => q{
use vars ('$_ep_DomTree', '@ISA', '@param') ;
*_ep_rp=\\&XML::Embperl::DOM::Node::iReplaceChildWithCDATA;
+*_ep_rpid=\\&XML::Embperl::DOM::Node::iReplaceChildWithMsgId;
*_ep_rpurl=\\&XML::Embperl::DOM::Node::iReplaceChildWithUrlDATA;
*_ep_cp=\\&XML::Embperl::DOM::Tree::iCheckpoint;
*_ep_dcp=\\&XML::Embperl::DOM::Tree::iDiscardAfterCheckpoint;
@@ -363,6 +364,7 @@
compiletimeperlcode => q{
use vars ('$_ep_DomTree', '@ISA', '@param') ;
*_ep_rp=\\&XML::Embperl::DOM::Node::iReplaceChildWithCDATA;
+*_ep_rpid=\\&XML::Embperl::DOM::Node::iReplaceChildWithMsgId;
*_ep_rpurl=\\&XML::Embperl::DOM::Node::iReplaceChildWithUrlDATA;
*_ep_cp=\\&XML::Embperl::DOM::Tree::iCheckpoint;
*_ep_dcp=\\&XML::Embperl::DOM::Tree::iDiscardAfterCheckpoint;
No revision
No revision
1.1.2.22 +16 -1 embperl/Embperl/Syntax/Attic/EmbperlBlocks.pm
Index: EmbperlBlocks.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Syntax/Attic/EmbperlBlocks.pm,v
retrieving revision 1.1.2.21
retrieving revision 1.1.2.22
diff -u -r1.1.2.21 -r1.1.2.22
--- EmbperlBlocks.pm 27 Jan 2002 20:04:36 -0000 1.1.2.21
+++ EmbperlBlocks.pm 10 Feb 2002 21:26:16 -0000 1.1.2.22
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: EmbperlBlocks.pm,v 1.1.2.21 2002/01/27 20:04:36 richter Exp $
+# $Id: EmbperlBlocks.pm,v 1.1.2.22 2002/02/10 21:26:16 richter Exp $
#
###################################################################################
@@ -470,6 +470,21 @@
compilechilds => 0,
removenode => 3,
},
+ },
+ },
+ 'Embperl output msg id' => {
+ 'text' => '[=',
+ 'end' => '=]',
+ 'unescape' => 1,
+ 'procinfo' => {
+ embperl => {
+ perlcode =>
+ [
+ '_ep_rpid(%$x%,scalar(%#0%));',
+ ],
+ removenode => 4,
+ compilechilds => 0,
+ }
},
},
) ;
No revision
No revision
1.1.2.2 +1 -1 embperl/test/cmp/varepvar.htm
Index: varepvar.htm
===================================================================
RCS file: /home/cvs/embperl/test/cmp/varepvar.htm,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- varepvar.htm 4 Dec 2000 09:18:38 -0000 1.1.2.1
+++ varepvar.htm 10 Feb 2002 21:26:16 -0000 1.1.2.2
@@ -5,7 +5,7 @@
</head>
$conf = <br>
-^\$_\[0\] = HTML::Embperl::Req=HASH\(0x.*?\) <br>
+^\$_\[0\] = Embperl::Req=HASH\(0x.*?\) <br>
$_[1] = <br>
^\$rec_rec = Apache=SCALAR\(0x.*?\)<br>
No revision
No revision
1.24.4.35 +5 -13 embperl/test/conf/httpd.conf.src
Index: httpd.conf.src
===================================================================
RCS file: /home/cvs/embperl/test/conf/httpd.conf.src,v
retrieving revision 1.24.4.34
retrieving revision 1.24.4.35
diff -u -r1.24.4.34 -r1.24.4.35
--- httpd.conf.src 6 Feb 2002 18:22:33 -0000 1.24.4.34
+++ httpd.conf.src 10 Feb 2002 21:26:16 -0000 1.24.4.35
@@ -123,9 +123,9 @@
print OFH <<EOD ;
SetEnv EMBPERL_ALLOW (asc|\\.xml\$|\\.htm\$)
-
-PerlScript \"$EPPATH/test/conf/$EPSTARTUP\"
-
+
+PerlRequire \"$EPPATH/test/conf/$EPSTARTUP\"
+#PerlModule Embperl
Embperl_UseEnv on
@@ -528,24 +528,16 @@
<Location /eg/web>
-SetEnv EMBPERL_RECIPE EmbperlWeb
+EMBPERL_RECIPE EmbperlWeb
SetEnv EMBPERL_ALLOW .
-
PerlSetEnv EMBPERL_OBJECT_BASE base.htm
-
PerlSetEnv EMBPERL_OBJECT_APP epwebapp.pl
-
PerlSetEnv EMBPERL_OBJECT_STOPDIR \"$EPPATH/eg/web\"
-
-PerlSetEnv EMBPERL_FILESMATCH \"\\.htm.?\$|\\.epl\$|\\.xml\$|\\.pod\$\"
-
+PerlSetEnv EMBPERL_URIMATCH \"\\.htm.?\$|\\.epl\$|\\.xml\$|\\.pod\$\"
SetHandler perl-script
-
PerlHandler Embperl::Object
-
Options ExecCGI
-
</Location>
1.9.6.9 +2 -1 embperl/test/conf/startup.pl
Index: startup.pl
===================================================================
RCS file: /home/cvs/embperl/test/conf/startup.pl,v
retrieving revision 1.9.6.8
retrieving revision 1.9.6.9
diff -u -r1.9.6.8 -r1.9.6.9
--- startup.pl 28 Jan 2002 20:28:35 -0000 1.9.6.8
+++ startup.pl 10 Feb 2002 21:26:16 -0000 1.9.6.9
@@ -26,6 +26,7 @@
use Apache ;
use Apache::Registry ;
use Embperl ;
+use Embperl::Object ;
$cp = Embperl::Util::AddCompartment ('TEST') ;
@@ -34,6 +35,6 @@
$cp -> share ('$testshare') ;
-##require "$ENV{EMBPERL_SRC}/eg/webutil/EmbperlWebRecipe.pm" ;
+require "$ENV{EMBPERL_SRC}/eg/webutil/EmbperlWebRecipe.pm" ;
1 ;
No revision
No revision
1.1.2.8 +2 -1 embperl/xsbuilder/maps/Attic/ep_function.map
Index: ep_function.map
===================================================================
RCS file: /home/cvs/embperl/xsbuilder/maps/Attic/ep_function.map,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -u -r1.1.2.7 -r1.1.2.8
--- ep_function.map 28 Jan 2002 20:28:36 -0000 1.1.2.7
+++ ep_function.map 10 Feb 2002 21:26:16 -0000 1.1.2.8
@@ -11,7 +11,8 @@
embperl_RunRequest | embperl_RunRequest | | embperl_run
embperl_CleanupRequest | embperl_CleanupRequest | | embperl_cleanup
embperl_SetupComponent | embperl_SetupComponent | r,pPerlParam,<ppComponent | embperl_setup_component
- embperl_ExecuteComponent | embperl_ExecuteComponent | | embperl_execute_component
+ embperl_ExecuteComponent | embperl_ExecuteComponent | | embperl_execute_component
+ embperl_GetText | embperl_GetText | | embperl_gettext
MODULE=Embperl::Component PREFIX=embperl_
1.1.2.15 +22 -16 embperl/xsbuilder/maps/Attic/ep_structure.map
Index: ep_structure.map
===================================================================
RCS file: /home/cvs/embperl/xsbuilder/maps/Attic/ep_structure.map,v
retrieving revision 1.1.2.14
retrieving revision 1.1.2.15
diff -u -r1.1.2.14 -r1.1.2.15
--- ep_structure.map 7 Feb 2002 06:56:21 -0000 1.1.2.14
+++ ep_structure.map 10 Feb 2002 21:26:16 -0000 1.1.2.15
@@ -1,4 +1,23 @@
MALLOC=svinc:$dest = ($type)SvREFCNT_inc($src)
+
+ <tTokenTable>
+! pCompilerInfo | compiler_info
+ sName | name
+! sRootNode | root_node
+! cStartChars | start_chars
+! cAllChars | all_chars
+! pTokens | tokens
+! numTokens | tokens
+! bLSearch | lsearch
+! nDefNodeType | def_node_type
+! pContainsToken | contains_token
+! new
+! private
+ </tTokenTable>
+
+
+
+ MALLOC=strdup:$dest = ($type)ep_pstrdup(obj->pPool,$src)
<tReq>
! _perlsv
@@ -27,7 +46,8 @@
pCleanupAV | cleanup_vars
pCleanupPackagesHV | cleanup_packages
sInitialCWD | initial_cwd
-
+ pMessages | messages
+ pDefaultMessages | default_messages
startclock
stsv_count
! MemCheckpoint | mem_checkpoint
@@ -204,6 +224,7 @@
sUri | uri
sPathInfo | path_info
sQueryInfo | query_info
+ sLanguage | language
new
! private
</tReqParam>
@@ -226,21 +247,6 @@
new
! private
</tThreadData>
- <tTokenTable>
-! pCompilerInfo | compiler_info
- sName | name
-! sRootNode | root_node
-! cStartChars | start_chars
-! cAllChars | all_chars
-! pTokens | tokens
-! numTokens | tokens
-! bLSearch | lsearch
-! nDefNodeType | def_node_type
-! pContainsToken | contains_token
-! new
-! private
- </tTokenTable>
-
<tComponentOutput>
! _perlsv
1.1.2.10 +4 -10 embperl/xsbuilder/maps/Attic/ep_type.map
Index: ep_type.map
===================================================================
RCS file: /home/cvs/embperl/xsbuilder/maps/Attic/ep_type.map,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -u -r1.1.2.9 -r1.1.2.10
--- ep_type.map 7 Feb 2002 06:56:21 -0000 1.1.2.9
+++ ep_type.map 10 Feb 2002 21:26:16 -0000 1.1.2.10
@@ -1,25 +1,19 @@
struct tThreadData | Embperl::Thread | T_MAGICHASH_SV
-
struct tApp | Embperl::App | T_MAGICHASH_SV
struct tAppConfig | Embperl::App::Config | T_MAGICHASH_SV
struct tReq | Embperl::Req | T_MAGICHASH_SV
-
struct tReqConfig | Embperl::Req::Config | T_MAGICHASH_SV
-
struct tReqParam | Embperl::Req::Param | T_MAGICHASH_SV
struct tComponent | Embperl::Component | T_MAGICHASH_SV
-
struct tComponentConfig | Embperl::Component::Config | T_MAGICHASH_SV
-
struct tComponentParam | Embperl::Component::Param | T_MAGICHASH_SV
-
struct tComponentOutput | Embperl::Component::Output | T_MAGICHASH_SV
struct tCacheItem | Embperl::CacheItem | T_MAGICHASH_SV
-
struct tTokenTable | Embperl::Syntax | T_MAGICHASH_SV
+
struct tBuf |
struct tCharTrans |
@@ -32,9 +26,9 @@
tPerlInterpreter |
-AV * | AVREF | T_AVREF | svinc
-HV * | HVREF | T_HVREF | svinc
-SV * | SVPTR | T_SVPTR | svinc
+AV * | AVREF | T_AVREF | | svinc
+HV * | HVREF | T_HVREF | | svinc
+SV * | SVPTR | T_SVPTR | | svinc
CV |
FILEIO |
HV |
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-cvs-help@perl.apache.org