richter 02/01/27 12:04:37
Modified: . Tag: Embperl2c Embperl.pm epcomp.c epdat2.h
epinit.c epmain.c epprovider.c test.pl
Embperl Tag: Embperl2c Syntax.pm Util.pm
Embperl/Recipe Tag: Embperl2c Embperl.pm
Embperl/Syntax Tag: Embperl2c EmbperlBlocks.pm RTF.pm SSI.pm
test/cmp Tag: Embperl2c include.htm
test/html/rawinput Tag: Embperl2c include.htm
xsbuilder/maps Tag: Embperl2c ep_structure.map ep_type.map
Log:
Revision Changes Path
No revision
No revision
1.118.4.83 +11 -6 embperl/Embperl.pm
Index: Embperl.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl.pm,v
retrieving revision 1.118.4.82
retrieving revision 1.118.4.83
diff -u -r1.118.4.82 -r1.118.4.83
--- Embperl.pm 25 Jan 2002 20:19:26 -0000 1.118.4.82
+++ Embperl.pm 27 Jan 2002 20:04:34 -0000 1.118.4.83
@@ -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.82 2002/01/25 20:19:26 richter Exp $
+# $Id: Embperl.pm,v 1.118.4.83 2002/01/27 20:04:34 richter Exp $
#
###################################################################################
@@ -35,6 +35,7 @@
use vars qw(
@ISA
$VERSION
+ $cwd
) ;
@@ -56,6 +57,8 @@
Boot ($VERSION) ;
Init (undef, {}) ;
+$cwd = Cwd::fastcwd();
+
1 ;
#######################################################################################
@@ -413,15 +416,16 @@
#######################################################################################
-sub Export
+sub export
{
- my ($self, $exports, $caller) = @_ ;
-
- my $package = $self -> CurrPackage ;
+ my ($r, $caller) = @_ ;
- print Embperl::LOG "[$$]IMP: Create Imports for $caller from $package
($exports)\n" ;
+ my $package = $r -> component -> curr_package ;
no strict ;
+ my $exports = \%{"$package\:\:_ep_exports"} ;
+
+ print Embperl::LOG "[$$]IMP: Create Imports for $caller from $package\n" ;
foreach $k (keys %$exports)
{
@@ -433,5 +437,6 @@
}
#######################################################################################
+
1 ;
1.4.2.90 +6 -6 embperl/Attic/epcomp.c
Index: epcomp.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epcomp.c,v
retrieving revision 1.4.2.89
retrieving revision 1.4.2.90
diff -u -r1.4.2.89 -r1.4.2.90
--- epcomp.c 24 Jan 2002 08:37:05 -0000 1.4.2.89
+++ epcomp.c 27 Jan 2002 20:04:34 -0000 1.4.2.90
@@ -9,7 +9,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epcomp.c,v 1.4.2.89 2002/01/24 08:37:05 richter Exp $
+# $Id: epcomp.c,v 1.4.2.90 2002/01/27 20:04:34 richter Exp $
#
###################################################################################*/
@@ -1985,7 +1985,7 @@
/*
av_push (pSaveAV, newSViv (r -> Component.xCurrDomTree)) ;
- av_push (pSaveAV, newSViv (r -> Component.pCurrEscape)) ;
+ av_push (pSaveAV, newSViv (r -> Component.xCurrNode)) ;
av_push (pSaveAV, newSViv (ArrayGetSize (r -> pApp, DomTree_self
(xOrgDomTree) -> pOrder))) ;
if (r -> Component.Config.bDebug & dbgCompile)
@@ -1995,7 +1995,7 @@
#endif
av_push (pSaveAV, newSViv (r -> Component.xCurrDomTree)) ;
- av_push (pSaveAV, newSViv (PTR2IV(r -> Component.pCurrEscape))) ;
+ av_push (pSaveAV, newSViv (r -> Component.xCurrNode)) ;
av_push (pSaveAV, newSViv (r -> Component.nCurrRepeatLevel)) ;
av_push (pSaveAV, newSViv (r -> Component.nCurrCheckpoint)) ;
@@ -2050,13 +2050,13 @@
/* DomTree_checkpoint (r, -1) ; */
r -> Component.xCurrDomTree = SvIV (* av_fetch (pSaveAV, 0, 0)) ;
- r -> Component.pCurrEscape = INT2PTR(struct tCharTrans *, SvIV (* av_fetch
(pSaveAV, 1, 0))) ;
+ r -> Component.xCurrNode = SvIV (* av_fetch (pSaveAV, 1, 0)) ;
r -> Component.nCurrRepeatLevel = (tRepeatLevel)SvIV (* av_fetch (pSaveAV, 2,
0)) ;
r -> Component.nCurrCheckpoint = SvIV (* av_fetch (pSaveAV, 3, 0)) ;
pCallerDomTree = DomTree_self (r -> Component.xCurrDomTree) ;
- /* xDocFraq = Node_replaceChildWithNode (pSubDomTree, pSubDomTree -> xDocument,
pCallerDomTree, r -> Component.pCurrEscape) ; */
- r -> Component.xCurrNode = xDocFraq = Node_insertAfter (r -> pApp, pSubDomTree,
pSubDomTree -> xDocument, 0, pCallerDomTree, (int)(r -> Component.pCurrEscape), r ->
Component.nCurrRepeatLevel) ;
+ /* xDocFraq = Node_replaceChildWithNode (pSubDomTree, pSubDomTree -> xDocument,
pCallerDomTree, r -> Component.xCurrNode) ; */
+ r -> Component.xCurrNode = xDocFraq = Node_insertAfter (r -> pApp, pSubDomTree,
pSubDomTree -> xDocument, 0, pCallerDomTree, r -> Component.xCurrNode, r ->
Component.nCurrRepeatLevel) ;
/* Element_selfSetAttribut (pCallerDomTree, Node_self (pCallerDomTree,
xDocFraq), NULL, xOrderIndexAttr, NULL, nOrderNdx, 0) ; */
1.1.2.17 +4 -1 embperl/Attic/epdat2.h
Index: epdat2.h
===================================================================
RCS file: /home/cvs/embperl/Attic/epdat2.h,v
retrieving revision 1.1.2.16
retrieving revision 1.1.2.17
diff -u -r1.1.2.16 -r1.1.2.17
--- epdat2.h 25 Jan 2002 07:04:31 -0000 1.1.2.16
+++ epdat2.h 27 Jan 2002 20:04:34 -0000 1.1.2.17
@@ -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.16 2002/01/25 07:04:31 richter Exp $
+# $Id: epdat2.h,v 1.1.2.17 2002/01/27 20:04:34 richter Exp $
#
###################################################################################*/
@@ -144,6 +144,9 @@
int nImport ;
int nFirstLine ;
int nMtime ; /**< last modification time of pInput */
+ AV * pParam ; /**< parameters passed via Execute */
+ HV * pFormHash; /**< fdat for this component */
+ AV * pFormArray ; /**< ffld for this component */
} tComponentParam ;
1.1.2.20 +14 -3 embperl/Attic/epinit.c
Index: epinit.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epinit.c,v
retrieving revision 1.1.2.19
retrieving revision 1.1.2.20
diff -u -r1.1.2.19 -r1.1.2.20
--- epinit.c 25 Jan 2002 20:19:26 -0000 1.1.2.19
+++ epinit.c 27 Jan 2002 20:04:34 -0000 1.1.2.20
@@ -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.19 2002/01/25 20:19:26 richter Exp $
+# $Id: epinit.c,v 1.1.2.20 2002/01/27 20:04:34 richter Exp $
#
###################################################################################*/
@@ -1261,9 +1261,9 @@
tComponent * c ;
tComponentParam * pParam ;
tComponentConfig * pConfig ;
- epTHX ;
+ epTHX_
tComponent * pPrev = NULL ;
-
+ char * p ;
if (r -> Component._perlsv)
{ /* we have already a component, so let safe it first */
@@ -1343,6 +1343,17 @@
c -> nSourceline = c -> Param.nFirstLine ;
if (!pParam -> sInputfile)
pParam -> sInputfile = r -> Param.sFilename ;
+ else if (p = strchr(pParam -> sInputfile, '#'))
+ {
+ pParam -> sSub = p + 1 ;
+ if (p == pParam -> sInputfile && c -> pPrev)
+ pParam -> sInputfile = c -> pPrev -> sSourcefile ;
+ else
+ *p = '\0' ;
+ }
+ if (!*pParam -> sInputfile)
+ pParam -> sInputfile = r -> Param.sFilename ;
+
*ppComponent = c ;
1.75.4.92 +37 -2 embperl/epmain.c
Index: epmain.c
===================================================================
RCS file: /home/cvs/embperl/epmain.c,v
retrieving revision 1.75.4.91
retrieving revision 1.75.4.92
diff -u -r1.75.4.91 -r1.75.4.92
--- epmain.c 25 Jan 2002 20:19:26 -0000 1.75.4.91
+++ epmain.c 27 Jan 2002 20:04:34 -0000 1.75.4.92
@@ -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.91 2002/01/25 20:19:26 richter Exp $
+# $Id: epmain.c,v 1.75.4.92 2002/01/27 20:04:34 richter Exp $
#
###################################################################################*/
@@ -1132,6 +1132,36 @@
return OutputToFile (r) ;
}
+/* ---------------------------------------------------------------------------- */
+/* */
+/* export symbols into caller package */
+/* */
+/* ---------------------------------------------------------------------------- */
+
+
+static int export (/*in*/ tReq * r)
+
+ {
+ epTHX_
+ SV * sCaller = sv_2mortal(newSVpv (HvNAME (r -> Component.pImportStash), 0)) ;
+ dSP ;
+
+ PUSHMARK(sp);
+ XPUSHs(r -> _perlsv);
+ XPUSHs(sCaller) ;
+ PUTBACK;
+ perl_call_method ("export", G_SCALAR | G_EVAL) ;
+ if (SvTRUE (ERRSV))
+ {
+ STRLEN l ;
+ strncpy (r -> errdat1, SvPV (ERRSV, l), sizeof (r -> errdat1) - 1) ;
+ LogError (r, rcEvalErr) ;
+ sv_setpv(ERRSV,"");
+ }
+ tainted = 0 ;
+
+ return ok ;
+ }
/* ---------------------------------------------------------------------------- */
@@ -1362,6 +1392,9 @@
else
LogError (r, rc) ;
+ if (r -> Component.Param.nImport > 0)
+ export (r) ;
+
/* --- Restore Operatormask and Package, destroy temp perl sv's --- */
FREETMPS ;
@@ -1468,7 +1501,9 @@
if (!r -> bError)
{
- if (r -> Component.Param.pOutput)
+ if (r -> Component.Param.nImport > 0)
+ export (r) ;
+ else if (r -> Component.Param.pOutput)
OutputToMem (r) ;
else if (r -> Component.pOutput == r -> Component.pPrev -> pOutput)
AppendToUpperTree (r) ;
1.1.2.27 +32 -2 embperl/Attic/epprovider.c
Index: epprovider.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epprovider.c,v
retrieving revision 1.1.2.26
retrieving revision 1.1.2.27
diff -u -r1.1.2.26 -r1.1.2.27
--- epprovider.c 25 Jan 2002 08:00:31 -0000 1.1.2.26
+++ epprovider.c 27 Jan 2002 20:04:34 -0000 1.1.2.27
@@ -9,7 +9,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epprovider.c,v 1.1.2.26 2002/01/25 08:00:31 richter Exp $
+# $Id: epprovider.c,v 1.1.2.27 2002/01/27 20:04:34 richter Exp $
#
###################################################################################*/
@@ -301,6 +301,7 @@
tProviderFile * pNew ;
const char * sFilename ;
const char * sDir = NULL ;
+ char * c ;
if ((rc = Provider_New (r, sizeof(tProviderFile), pItem, pProviderClass,
pParam)) != ok)
return rc ;
@@ -308,6 +309,17 @@
pNew = (tProviderFile *)pItem -> pProvider ;
sFilename = GetHashValueStr (aTHX_ pParam, "filename", r ->
Component.Param.sInputfile) ;
+
+#ifdef WIN32
+ c = sFilename ;
+ while (*c)
+ { /* convert / to \ */
+ if (*c == '/')
+ *c = '\\' ;
+ c++ ;
+ }
+#endif
+
/* is it a relative filename? -> append path */
if (!(sFilename[0] == '/'
#ifdef WIN32
@@ -322,7 +334,11 @@
pNew -> sFilename = malloc (l) ;
strcpy ((char *)pNew -> sFilename, r -> Component.sCWD) ;
+#ifdef WIN32
+ strcat ((char *)pNew -> sFilename, "\\") ;
+#else
strcat ((char *)pNew -> sFilename, "/") ;
+#endif
strcat ((char *)pNew -> sFilename, sFilename) ;
}
else
@@ -375,6 +391,16 @@
epTHX_
const char * sFilename = GetHashValueStr (aTHX_ pParam, "filename", r ->
Component.Param.sInputfile) ;
const char * sDir = "" ;
+ char * c = sFilename ;
+
+#ifdef WIN32
+ while (*c)
+ { /* convert / to \ */
+ if (*c == '/')
+ *c = '\\' ;
+ c++ ;
+ }
+#endif
/* is it a relative filename? -> append path */
if (!(sFilename[0] == '/'
@@ -389,7 +415,11 @@
sDir = r -> Component.sCWD ;
}
+#ifdef WIN32
+ sv_catpvf (pKey, "*file:%s%s%s", sDir, *sDir?"\\":"", sFilename) ;
+#else
sv_catpvf (pKey, "*file:%s%s%s", sDir, *sDir?"/":"", sFilename) ;
+#endif
return ok ;
}
@@ -1599,7 +1629,7 @@
if ((rc = Cache_GetContentSvIndex (r, pSrcCache, (SV **)&pCV, &xSrcDomTree,
bUseCache)) != ok)
return rc ;
- if (!bUseCache)
+ if (!bUseCache || !*pData || !pProvider -> pCache -> bCache)
{
if ((rc = embperl_Execute (r, xSrcDomTree, pCV, pData)) != ok)
return rc ;
1.70.4.109 +3 -3 embperl/test.pl
Index: test.pl
===================================================================
RCS file: /home/cvs/embperl/test.pl,v
retrieving revision 1.70.4.108
retrieving revision 1.70.4.109
diff -u -r1.70.4.108 -r1.70.4.109
--- test.pl 24 Jan 2002 08:37:05 -0000 1.70.4.108
+++ test.pl 27 Jan 2002 20:04:34 -0000 1.70.4.109
@@ -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.108 2002/01/24 08:37:05 richter Exp $
+# $Id: test.pl,v 1.70.4.109 2002/01/27 20:04:34 richter Exp $
#
###################################################################################
@@ -921,7 +921,7 @@
my $i = 0 ;
foreach (@INC)
{
- $INC[$i++] = File::Spec -> rel2abs ($_) ;
+ $INC[$i++] = File::Spec -> rel2abs ($_) if ($_) ;
}
}
@@ -1788,7 +1788,7 @@
print "\nTesting Execute function...\n\n" ;
- Embperl::Init ($logfile) ;
+ Embperl::Init (undef, {}) ;
$notseen = 1 ;
$txt = 'div.htm' ;
No revision
No revision
1.1.4.52 +6 -3 embperl/Embperl/Attic/Syntax.pm
Index: Syntax.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Attic/Syntax.pm,v
retrieving revision 1.1.4.51
retrieving revision 1.1.4.52
diff -u -r1.1.4.51 -r1.1.4.52
--- Syntax.pm 24 Jan 2002 08:37:06 -0000 1.1.4.51
+++ Syntax.pm 27 Jan 2002 20:04:36 -0000 1.1.4.52
@@ -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.51 2002/01/24 08:37:06 richter Exp $
+# $Id: Syntax.pm,v 1.1.4.52 2002/01/27 20:04:36 richter Exp $
#
###################################################################################
@@ -357,7 +357,8 @@
'procinfo' => {
embperl => {
perlcode => q{
-# any initialisation could be put here
+my $_ep_param_save = \@param ;
+*param = $Embperl::req -> component -> param -> param || [];
},
compiletimeperlcode => q{
use vars ('$_ep_DomTree', '@ISA', '@param') ;
@@ -371,7 +372,9 @@
*_ep_sa=\\&XML::Embperl::DOM::Element::iSetAttribut;
Embperl::Util::CreateAliases ;
},
- perlcodeend => '# Include here any cleanup code',
+ perlcodeend => q{
+*param = $_ep_param_save ;
+},
stackname => 'metacmd',
stackmatch => 'DocumentFraq',
'push' => 'DocumentFraq',
1.1.2.4 +3 -1 embperl/Embperl/Attic/Util.pm
Index: Util.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Attic/Util.pm,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- Util.pm 25 Jan 2002 07:04:32 -0000 1.1.2.3
+++ Util.pm 27 Jan 2002 20:04:36 -0000 1.1.2.4
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: Util.pm,v 1.1.2.3 2002/01/25 07:04:32 richter Exp $
+# $Id: Util.pm,v 1.1.2.4 2002/01/27 20:04:36 richter Exp $
#
###################################################################################
@@ -120,5 +120,7 @@
use strict ;
}
+
+#######################################################################################
1;
No revision
No revision
1.1.2.12 +3 -12 embperl/Embperl/Recipe/Attic/Embperl.pm
Index: Embperl.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Recipe/Attic/Embperl.pm,v
retrieving revision 1.1.2.11
retrieving revision 1.1.2.12
diff -u -r1.1.2.11 -r1.1.2.12
--- Embperl.pm 23 Jan 2002 07:58:27 -0000 1.1.2.11
+++ Embperl.pm 27 Jan 2002 20:04:36 -0000 1.1.2.12
@@ -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.1.2.11 2002/01/23 07:58:27 richter Exp $
+# $Id: Embperl.pm,v 1.1.2.12 2002/01/27 20:04:36 richter Exp $
#
###################################################################################
@@ -40,18 +40,8 @@
my $param = $r -> component -> param ;
my $config = $r -> component -> config ;
my $file = $param -> inputfile ;
-
+
die "no filename" if (!$file) ;
-=pod
- if (!$param -> {inputfile} && $param->{sub})
- {
- ($file) = $r -> Sourcefile =~ /.*(?:\/|\\)(.*?)$/ ;
- }
- else
- {
- $file = $r -> Sourcefile ;
- }
-=cut
if (ref $param -> input)
{
@@ -115,6 +105,7 @@
# }
#$run -> {'cache'} = $run -> {expires_in} || $run -> {expires_func} ||
exists ($run -> {expires_filename})?1:0 ;
+ $run -> {'cache'} = 0 ;
$self = $run ;
}
else
No revision
No revision
1.1.2.21 +4 -4 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.20
retrieving revision 1.1.2.21
diff -u -r1.1.2.20 -r1.1.2.21
--- EmbperlBlocks.pm 24 Jan 2002 08:37:06 -0000 1.1.2.20
+++ EmbperlBlocks.pm 27 Jan 2002 20:04:36 -0000 1.1.2.21
@@ -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.20 2002/01/24 08:37:06 richter Exp $
+# $Id: EmbperlBlocks.pm,v 1.1.2.21 2002/01/27 20:04:36 richter Exp $
#
###################################################################################
@@ -366,7 +366,7 @@
$self -> AddMetaStartEnd ('sub', 'endsub',
{
perlcode => 'sub _ep_sub_%&<noname>% { ',
- perlcodeend => '}; sub %^subname% { my @_ep_save ;
Embperl::Cmd::SubStart($_ep_DomTree,%$q%,\\@_ep_save); my $_ep_ret =
_ep_sub_%^subname% (@_); Embperl::Cmd::SubEnd($_ep_DomTree,\\@_ep_save); return
$_ep_ret } ; $_[0] -> ExportHash -> {%^"subname%} = \&%^subname% ; ',
+ perlcodeend => '}; sub %^subname% { my @_ep_save ;
Embperl::Cmd::SubStart($_ep_DomTree,%$q%,\\@_ep_save); my $_ep_ret =
_ep_sub_%^subname% (@_); Embperl::Cmd::SubEnd($_ep_DomTree,\\@_ep_save); return
$_ep_ret } ; $_ep_exports{%^"subname%} = \&%^subname% ; ',
removenode => 10,
mayjump => 1,
stackname2 => 'subname',
@@ -375,7 +375,7 @@
callreturn => 1,
},
{
- perlcode => '}; sub %^subname% { my @_ep_save ;
Embperl::Cmd::SubStart($_ep_DomTree,%$q%,\\@_ep_save); my $_ep_ret =
_ep_sub_%^subname% (@_); Embperl::Cmd::SubEnd($_ep_DomTree,\\@_ep_save); return
$_ep_ret } ; $_[0] -> ExportHash -> {%^"subname%} = \&%^subname% ; ',
+ perlcode => '}; sub %^subname% { my @_ep_save ;
Embperl::Cmd::SubStart($_ep_DomTree,%$q%,\\@_ep_save); my $_ep_ret =
_ep_sub_%^subname% (@_); Embperl::Cmd::SubEnd($_ep_DomTree,\\@_ep_save); return
$_ep_ret } ; $_ep_exports{%^"subname%} = \&%^subname% ; ',
removenode => 10,
mayjump => 0,
pop2 => 'subname',
@@ -394,7 +394,7 @@
callreturn => 1,
},
{
- perlcode => '}; sub %^subname% { my @_ep_save ;
Embperl::Cmd::SubStart($_ep_DomTree,%$q%,\\@_ep_save); my $_ep_ret =
_ep_sub_%^subname% (@_); Embperl::Cmd::SubEnd($_ep_DomTree,\\@_ep_save); return
$_ep_ret } ; $_[0] -> ExportHash -> {%^"subname%} = \&%^subname% ; ',
+ perlcode => '}; sub %^subname% { my @_ep_save ;
Embperl::Cmd::SubStart($_ep_DomTree,%$q%,\\@_ep_save); my $_ep_ret =
_ep_sub_%^subname% (@_); Embperl::Cmd::SubEnd($_ep_DomTree,\\@_ep_save); return
$_ep_ret } ; $Embperl::req -> component -> exports -> {%^"subname%} = \&%^subname% ;
',
removenode => 10,
mayjump => 0,
pop2 => 'subname',
1.1.2.24 +12 -12 embperl/Embperl/Syntax/Attic/RTF.pm
Index: RTF.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Syntax/Attic/RTF.pm,v
retrieving revision 1.1.2.23
retrieving revision 1.1.2.24
diff -u -r1.1.2.23 -r1.1.2.24
--- RTF.pm 22 Jan 2002 09:29:56 -0000 1.1.2.23
+++ RTF.pm 27 Jan 2002 20:04:36 -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: RTF.pm,v 1.1.2.23 2002/01/22 09:29:56 richter Exp $
+# $Id: RTF.pm,v 1.1.2.24 2002/01/27 20:04:36 richter Exp $
#
###################################################################################
@@ -101,7 +101,7 @@
} ;
if ($procinfo)
{
- #$procinfo -> {compiletimeperlcode} = q[my $tmp = %#'0% ; $tmp =~
s/_ep_rp\(.*?\,/push \@_ep_rtf_tmp,(/, $_[0] -> Code ($tmp) ; ] ;
+ #$procinfo -> {compiletimeperlcode} = q[my $tmp = %#'0% ; $tmp =~
s/_ep_rp\(.*?\,/push \@_ep_rtf_tmp,(/, $Embperl::req -> component -> code ($tmp) ; ] ;
$tag -> {'procinfo'} = { $self -> {-procinfotype} => $procinfo } ;
}
$self -> {-rtfCmds2} -> {$cmdname} = $tag ;
@@ -180,7 +180,7 @@
{
perlcode => '_ep_rp(%$x%,scalar(esc(join(\'\',',
perlcodeend => '))));',
- compiletimeperlcode => q[if ($_ep_rtf_inside) { my $tmp
= $_[0] -> Code () ; $tmp =~ s/_ep_rp\(.*?\,/push \@_ep_rtf_tmp,(/ ; $_[0] -> Code
($tmp) } ; $_ep_rtf_cmd = 1 ;],
+ compiletimeperlcode => q[if ($_ep_rtf_inside) { my $tmp
= $Embperl::req -> component -> code () ; $tmp =~ s/_ep_rp\(.*?\,/push
\@_ep_rtf_tmp,(/ ; $Embperl::req -> component -> code ($tmp) } ; $_ep_rtf_cmd = 1 ;],
},
{
'inside' => \%Var,
@@ -191,7 +191,7 @@
{
perlcode => '_ep_rp(%$x%,scalar(esc(join(\'\', ',
perlcodeend => '))));',
- compiletimeperlcode => q[if ($_ep_rtf_inside) { my $tmp
= $_[0] -> Code () ; $tmp =~ s/_ep_rp\(.*?\,/push \@_ep_rtf_tmp,(/ ; $tmp .= '\'' .
(%>'-1%) . '\'' . ',' ; $_[0] -> Code ($tmp) } ; $_ep_rtf_cmd = 1 ;],
+ compiletimeperlcode => q[if ($_ep_rtf_inside) { my $tmp
= $Embperl::req -> component -> code () ; $tmp =~ s/_ep_rp\(.*?\,/push
\@_ep_rtf_tmp,(/ ; $tmp .= '\'' . (%>'-1%) . '\'' . ',' ; $Embperl::req -> component
-> code ($tmp) } ; $_ep_rtf_cmd = 1 ;],
},
{
'inside' => \%Var,
@@ -419,7 +419,7 @@
'nodename' => ':{:}:full_var',
'procinfo' => {
'embperl' => {
- compiletimeperlcode => q[$_[0] -> Code
(Embperl::Syntax::RTF::Var2Code (%#'0%)) ;],
+ compiletimeperlcode => q[$Embperl::req -> component -> code
(Embperl::Syntax::RTF::Var2Code (%#'0%)) ;],
},
},
@@ -451,7 +451,7 @@
'inside' => {},
'procinfo' => {
'embperl' => {
- compiletimeperlcodeend => q[ $_[0] -> Code ('') if
(!$_ep_rtf_inside || $_ep_rtf_cmd) ; $_ep_rtf_cmd = 0 ;],
+ compiletimeperlcodeend => q[ $Embperl::req -> component -> code
('') if (!$_ep_rtf_inside || $_ep_rtf_cmd) ; $_ep_rtf_cmd = 0 ;],
perlcodeend => q[ { my $tmp = %#'0% ; if ($tmp =~ /\"\s*$/) { $tmp
=~ s/\\\\/\\\\\\\\/g ; push @_ep_rtf_tmp, Text::ParseWords::quotewords('\s+', 0, $tmp)
} else { push @_ep_rtf_tmp,$tmp } }],
},
},
@@ -467,7 +467,7 @@
'procinfo' => {
'embperl' => {
compiletimeperlcode => q[$_ep_rtf_inside++ if ($_ep_rtf_inside) ; ],
- compiletimeperlcodeend => q[ if ($_ep_rtf_inside) {
$_ep_rtf_inside-- ; if ($_ep_rtf_inside == 0) { $_[0] -> Code ($_ep_rtf_code) ; } } ],
+ compiletimeperlcodeend => q[ if ($_ep_rtf_inside) {
$_ep_rtf_inside-- ; if ($_ep_rtf_inside == 0) { $Embperl::req -> component -> code
($_ep_rtf_code) ; } } ],
},
},
},
@@ -652,10 +652,10 @@
$_ep_rtf_inside-- ;
if ($_ep_rtf_inside == 0)
{
- my $x = $_[0] -> Code ;
+ my $x = $Embperl::req -> component -> code ;
$_ep_rtf_code =~ s/\$x/$x/g ;
- $_[0] -> Code (q[
+ $Embperl::req -> component -> code (q[
{
$_ep_rtf_tmp[0] =~
s/\\\\\\\\[0-9a-zA-Z]+\s*//g ;
@@ -702,7 +702,7 @@
}
else
{
- $_[0] -> Code ('') ;
+ $Embperl::req -> component -> code ('') ;
}
],
},
@@ -738,9 +738,9 @@
1;
=pod
- #$_[0] -> Code ($_ep_rtf_code) ;
+ #$Embperl::req -> component -> code ($_ep_rtf_code) ;
- my $x = $_[0] -> Code ;
+ my $x = $Embperl::req -> component -> code ;
my ($op, $cmp, $a, $b) =
XML::Embperl::DOM::Node::iChildsText (%$q%,%$x%,1) =~
/\:([=<>])+\s*\"(.*?)\"(?:\s*\"(.*?)\"\s*\"(.*?)\")?/ ;
if ($op eq '=') { $op = 'eq' }
1.1.2.14 +8 -8 embperl/Embperl/Syntax/Attic/SSI.pm
Index: SSI.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Syntax/Attic/SSI.pm,v
retrieving revision 1.1.2.13
retrieving revision 1.1.2.14
diff -u -r1.1.2.13 -r1.1.2.14
--- SSI.pm 22 Jan 2002 09:29:56 -0000 1.1.2.13
+++ SSI.pm 27 Jan 2002 20:04:36 -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: SSI.pm,v 1.1.2.13 2002/01/22 09:29:56 richter Exp $
+# $Id: SSI.pm,v 1.1.2.14 2002/01/27 20:04:36 richter Exp $
#
###################################################################################
@@ -108,12 +108,12 @@
] } ) ;
$self -> AddComment ('#set', ['var', 'value'], undef, undef,
{ perlcode => '%&value%',
- compiletimeperlcode => '$_[0] -> Code
(q{$ENV{%&*\'var%} = "} . Embperl::Syntax::SSI::InterpretVars (%&\'value%) . \'";\')
;',
+ compiletimeperlcode => '$Embperl::req -> component ->
code (q{$ENV{%&*\'var%} = "} . Embperl::Syntax::SSI::InterpretVars (%&\'value%) .
\'";\') ;',
removenode => 1
} ) ;
$self -> AddComment ('#if', ['expr'], undef, undef,
{ perlcode => '%&\'expr%',
- compiletimeperlcode => '$_[0] -> Code (q{if (} .
Embperl::Syntax::SSI::InterpretVars (%&\'expr%) . \') {\') ;',
+ compiletimeperlcode => '$Embperl::req -> component ->
code (q{if (} . Embperl::Syntax::SSI::InterpretVars (%&\'expr%) . \') {\') ;',
removenode => 10,
mayjump => 1,
stackname => 'ssicmd',
@@ -121,7 +121,7 @@
} ) ;
$self -> AddComment ('#elif', ['expr'], undef, undef,
{ perlcode => '%&\'expr%',
- compiletimeperlcode => '$_[0] -> Code (\'} elsif (\'
. Embperl::Syntax::SSI::InterpretVars (%&\'expr%) . \') {\') ;',
+ compiletimeperlcode => '$Embperl::req -> component ->
code (\'} elsif (\' . Embperl::Syntax::SSI::InterpretVars (%&\'expr%) . \') {\') ;',
removenode => 10,
mayjump => 1,
stackname => 'ssicmd',
@@ -145,11 +145,11 @@
} ) ;
my $tag = $self -> AddComment ('#syntax', ['type'], undef, undef,
{
- compiletimeperlcode => '$_[0] -> Syntax
(Embperl::Syntax::GetSyntax(%&\'type%, $_[0] -> SyntaxName));',
+ compiletimeperlcode => '$Embperl::req -> component -> syntax
(Embperl::Syntax::GetSyntax(%&\'type%, $Embperl::req -> component -> syntax ->
name));',
removenode => 3,
},
) ;
- my $ptcode = '$_[0] -> Syntax (Embperl::Syntax::GetSyntax(\'%%\', $_[0] ->
SyntaxName)) ;' ;
+ my $ptcode = '$Embperl::req -> component -> syntax
(Embperl::Syntax::GetSyntax(\'%%\', $Embperl::req -> component -> syntax -> name)) ;' ;
if (!$self -> {-ssiAssignAttrType})
{
@@ -185,7 +185,7 @@
$ENV{DATE_GMT} = gmtime ;
$ENV{DATE_LOCAL} = localtime ;
- $ENV{DOCUMENT_NAME} = $fn = basename ($epreq -> Sourcefile) ;
+ $ENV{DOCUMENT_NAME} = $fn = basename ($epreq -> component -> sourcefile) ;
$ENV{DOCUMENT_URI} = $apreq?$apreq -> uri:'' ;
$ENV{LAST_MODIFIED} = format_time('', (stat ($fn))[9])
}
@@ -355,7 +355,7 @@
}
my $output = "";
- Embperl::Execute({inputfile=>$filename, output=>\$output, syntax=>$type});
+ Embperl::Req::ExecuteComponent({inputfile=>$filename, output=>\$output,
syntax=>$type});
local $Embperl::escmode = 0 ;
return $output;
No revision
No revision
1.7.6.3 +4 -0 embperl/test/cmp/include.htm
Index: include.htm
===================================================================
RCS file: /home/cvs/embperl/test/cmp/include.htm,v
retrieving revision 1.7.6.2
retrieving revision 1.7.6.3
diff -u -r1.7.6.2 -r1.7.6.3
--- include.htm 14 Sep 2000 12:02:26 -0000 1.7.6.2
+++ include.htm 27 Jan 2002 20:04:36 -0000 1.7.6.3
@@ -20,6 +20,10 @@
<H1> 4.) Change the variable, but not the code</H1>
<P>Transfer some vars Do it again !</P>
+<H1> 5a.) Use method -> param to pass parameters</H1>
+
+
+<P>Use method -> param to transfer some data (1 2 3 4) !</P>
<H1> 5.) Use \@param to pass parameters</H1>
No revision
No revision
1.1.4.8 +11 -1 embperl/test/html/rawinput/Attic/include.htm
Index: include.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/rawinput/Attic/include.htm,v
retrieving revision 1.1.4.7
retrieving revision 1.1.4.8
diff -u -r1.1.4.7 -r1.1.4.8
--- include.htm 15 May 2001 14:21:23 -0000 1.1.4.7
+++ include.htm 27 Jan 2002 20:04:36 -0000 1.1.4.8
@@ -55,6 +55,16 @@
'package' => 'MyPackage::Interface',
req_rec => $req_rec}) ;
-]
+<H1> 5a.) Use method -> param to pass parameters</H1>
+
+
+[-
+Execute ({input => \"<P>Use method -> param to transfer some data ([+
do { \$p = shift -> component -> param -> param ; \"\@\$p\" } +]) !</P>\n",
+ inputfile => 'Parammethod',
+ param => [1, 2, 3, 4] }
+ ) ;
+-]
+
<H1> 5.) Use \@param to pass parameters</H1>
@@ -150,7 +160,7 @@
<p><hr>
-<small>HTML::Embperl (c) 1997-1998 G.Richter</small>
+<small>Embperl (c) 1997-2002 G.Richter</small>
</body>
</html>
No revision
No revision
1.1.2.9 +95 -48 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.8
retrieving revision 1.1.2.9
diff -u -r1.1.2.8 -r1.1.2.9
--- ep_structure.map 27 Jan 2002 12:40:00 -0000 1.1.2.8
+++ ep_structure.map 27 Jan 2002 20:04:36 -0000 1.1.2.9
@@ -24,11 +24,13 @@
lastwarn[ERRDATLEN] | lastwarn
! pDomTreeAV | dom_tree_av
pCleanupAV | cleanup
- pCleanupPackagesHV | cleanup_packages
+ pCleanupPackagesHV | cleanup_packages
+
startclock
stsv_count
! MemCheckpoint | mem_checkpoint
-! pApacheConfig | apache_config
+! pApacheConfig | apache_config
+
new
! private
</struct tReq>
@@ -62,11 +64,16 @@
nSessionMode | session_mode
sLog | log
bDebug | debug
- sMailhost | mailhost
- sMailhelo | mailhelo
- sMailfrom | mailfrom
- bMaildebug | maildebug
- sMailErrorsTo | mail_errors_to
+ sMailhost | mailhost
+
+ sMailhelo | mailhelo
+
+ sMailfrom | mailfrom
+
+ bMaildebug | maildebug
+
+ sMailErrorsTo | mail_errors_to
+
new
! private
</tAppConfig>
@@ -121,7 +128,7 @@
pProg | prog
pProgRun | prog_run
pProgDef | prog_def
- pCodeSV | code_sv
+ pCodeSV | code
new
! private
</tComponent>
@@ -144,7 +151,8 @@
sXsltproc | xsltproc
sCompartment | compartment
! pOpcodeMask | opcode_mask
- nCleanup | cleanup
+ nCleanup | cleanup
+
new
! private
</tComponentConfig>
@@ -157,14 +165,19 @@
sSub | sub
nImport | import
nFirstLine | firstline
- nMtime | mtime
- pParam | param
- pFormHash | fdat
- pFormArray | ffld
+ nMtime | mtime
+
+ pParam | param
+
+ pFormHash | fdat
+
+ pFormArray | ffld
+
new
! private
</tComponentParam>
-
+
+
<tReqConfig>
! _perlsv
sAllow | allow
@@ -174,7 +187,8 @@
new
! private
</tReqConfig>
-
+
+
<tReqParam>
! _perlsv
sFilename | filename
@@ -185,7 +199,8 @@
new
! private
</tReqParam>
-
+
+
<tThreadData>
! _perlsv
! pPerlTHX | perl_thx
@@ -203,35 +218,67 @@
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
-! pPool | pool
- bDisableOutput | disable_output
-! pFirstBuf | first_buf
-! pLastBuf | last_buf
-! pFreeBuf | free_buf
-! pLastFreeBuf | last_free_buf
-! pMemBuf | mem_buf
-! pMemBufPtr | mem_buf_ptr
-! nMemBufSize | mem_buf_size
-! nMemBufSizeFree | mem_buf_size_free
-! nMarker | marker
-! ofd
- ofdobj
-! new
-! private
- </tComponentOutput>
+ <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
+
+! pPool | pool
+
+ bDisableOutput | disable_output
+
+! pFirstBuf | first_buf
+
+! pLastBuf | last_buf
+
+! pFreeBuf | free_buf
+
+! pLastFreeBuf | last_free_buf
+
+! pMemBuf | mem_buf
+
+! pMemBufPtr | mem_buf_ptr
+
+! nMemBufSize | mem_buf_size
+
+! nMemBufSizeFree | mem_buf_size_free
+
+! nMarker | marker
+
+! ofd
+
+ ofdobj
+
+! new
+
+! private
+
+ </tComponentOutput>
+
1.1.2.8 +39 -21 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.7
retrieving revision 1.1.2.8
diff -u -r1.1.2.7 -r1.1.2.8
--- ep_type.map 25 Jan 2002 08:01:01 -0000 1.1.2.7
+++ ep_type.map 27 Jan 2002 20:04:37 -0000 1.1.2.8
@@ -1,31 +1,44 @@
-struct tThreadData | Embperl::Thread | T_MAGICHASH_SV
+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 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 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 |
-struct request_rec | Apache::
-struct server_rec | Apache::Server
+struct tBuf |
+
+struct tCharTrans |
+struct request_rec | Apache::
-tPerlInterpreter |
-AV * | AVPTR | T_AVREF
-HV * | HVPTR | T_HVREF
+struct server_rec | Apache::Server
+
+
+
+tPerlInterpreter |
+
+AV * | AVREF | T_AVREF
+HV * | HVREF | T_HVREF
+SV * | SVPTR | T_SVPTR
CV |
FILEIO |
HV |
SV | SV
-SV * | SVPTR
I32 | IV
STRLEN | IV
bool | IV
@@ -34,9 +47,14 @@
tNode | IV
tPhase | IV
tRepeatLevel | IV
-struct tMemPool |
-AV |
-struct tToken |
-tApacheDirConfig |
-tCharMap |
+struct tMemPool |
+
+AV |
+
+struct tToken |
+
+tApacheDirConfig |
+
+tCharMap |
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]