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...@locus.apache.org on 2000/11/07 12:28:40 UTC
cvs commit: embperl/test/html/registry reggetsess.htm
richter 00/11/07 03:28:40
Modified: . Changes.pod Embperl.pm Embperl.xs EmbperlObject.pm
MANIFEST Makefile.PL TODO embperl.h ep.h epdat.h
epeval.c epmacro.h epmain.c test.pl typemap
Embperl Session.pm
test/cmp Execute.htm epodiv.htm importsub.htm importsub2.htm
test/conf httpd.conf.src
test/html importmodule.htm importsub2.htm subimp.htm
subimp.pm
test/html/EmbperlObject epodiv.htm
test/html/registry reggetsess.htm
Added: test/cmp eposubsub.htm3
test/html/EmbperlObject/sub/subsub/subsubsub eposubsub.htm
Log:
- Fixed problem that call to close triggers error in Session.pm when using Store::File.
Spotted by Alvar Freude.
- Fixed problem that GetSession doesn't return a value for new session.
Spotted by Angus Lees.
- Added new function SetSessionCookie, which can be used to set the session cookie
header in case you use Embperl session management, but don't use a
Embperl page in that request. Suggested by Alex Schmelkin.
- Fixed problem that DeleteSession does not work outside the base template, when
used with EmbperlObject. Spotted by Angus Lees.
- Fixed problem when use multiple nested ../foo.htm inside EmbperlObject.
Spotted by Neil Gunton.
- Included patch from Angus Lees to ease building on debian.
Revision Changes Path
1.135 +20 -0 embperl/Changes.pod
Index: Changes.pod
===================================================================
RCS file: /home/cvs/embperl/Changes.pod,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -r1.134 -r1.135
--- Changes.pod 2000/10/18 07:43:19 1.134
+++ Changes.pod 2000/11/07 11:28:16 1.135
@@ -1,5 +1,25 @@
=pod
+=head1 1.2b7_dev -- That's what currently under developement
+
+Last Update: <$localtime$> (MET)
+
+NOTE: This version is only available via L<"CVS"|CVS/"INTRO">
+
+ - Fixed problem that call to close triggers error in Session.pm when using Store::File.
+ Spotted by Alvar Freude.
+ - Fixed problem that GetSession doesn't return a value for new session.
+ Spotted by Angus Lees.
+ - Added new function SetSessionCookie, which can be used to set the session cookie
+ header in case you use Embperl session management, but don't use a
+ Embperl page in that request. Suggested by Alex Schmelkin.
+ - Fixed problem that DeleteSession does not work outside the base template, when
+ used with EmbperlObject. Spotted by Angus Lees.
+ - Fixed problem when use multiple nested ../foo.htm inside EmbperlObject.
+ Spotted by Neil Gunton.
+ - Included patch from Angus Lees to ease building on debian.
+
+
=head1 1.3b6 (BETA) 18. Oct 2000
- Embperl now runs on ActiveState Perl. (At least in offline mode,
1.122 +29 -12 embperl/Embperl.pm
Index: Embperl.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl.pm,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -r1.121 -r1.122
--- Embperl.pm 2000/10/18 06:53:14 1.121
+++ Embperl.pm 2000/11/07 11:28:18 1.122
@@ -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.121 2000/10/18 06:53:14 richter Exp $
+# $Id: Embperl.pm,v 1.122 2000/11/07 11:28:18 richter Exp $
#
###################################################################################
@@ -83,7 +83,7 @@
@ISA = qw(Exporter DynaLoader);
-$VERSION = '1.3b6';
+$VERSION = '1.3b7_dev';
##ep2## $VERSION = '2.0a7';
# HTML::Embperl cannot be bootstrapped in nonlazy mode except
@@ -584,8 +584,10 @@
sub CheckFile
{
- my ($filename, $req_rec, $AllowZeroFilesize, $allow, $path, $debug) = @_ ;
+ my ($filename, $req_rec, $AllowZeroFilesize, $allow, $pathref, $debug) = @_ ;
+ my $path = $$pathref ;
+
if (-d $filename)
{
#logerror (rcIsDir, $filename);
@@ -617,6 +619,7 @@
shift @path while ($skip--) ;
my $fn = '' ;
print LOG "[$$]Embperl path search Path: " . join (';',@path) . " Filename: $filename\n" if ($debug);
+ $$pathref = join (';', @path) ;
foreach (@path)
{
@@ -841,7 +844,7 @@
#my ($k, $v) ;
#while (($k, $v) = each (%$req))
# { warn "$k = $v" ; }
- if ($rc = CheckFile ($Inputfile, $req_rec, (($$req{options} || 0) & optAllowZeroFilesize), $$req{'allow'}, $$req{path}, (($$req{debug} || 0) & dbgObjectSearch)))
+ if ($rc = CheckFile ($Inputfile, $req_rec, (($$req{options} || 0) & optAllowZeroFilesize), $$req{'allow'}, \$req -> {path}, (($$req{debug} || 0) & dbgObjectSearch)))
{
FreeConfData ($conf) ;
return $rc ;
@@ -863,6 +866,8 @@
bless $r, $$req{'bless'} if (exists ($$req{'bless'})) ;
+ $r -> Path ($req->{path}) if ($req->{path}) ;
+
my $package = $r -> CurrPackage ;
$evalpackage = $package ;
my $exports ;
@@ -1686,11 +1691,11 @@
if ($HTML::Embperl::SessionMgnt == 1)
{
- return wantarray?(\%HTML::Embperl::udat, \%HTML::Embperl::mdat):\%HTML::Embperl::udat if ($udat -> {ID}) ;
+ return wantarray?(\%HTML::Embperl::udat, \%HTML::Embperl::mdat):\%HTML::Embperl::udat ;
}
else
{
- return wantarray?(\%HTML::Embperl::udat, \%HTML::Embperl::mdat):\%HTML::Embperl::udat if ($udat -> getid) ;
+ return wantarray?(\%HTML::Embperl::udat, \%HTML::Embperl::mdat):\%HTML::Embperl::udat ;
}
}
else
@@ -1727,7 +1732,8 @@
sub CleanupSession
{
- my $r = shift || HTML::Embperl::CurrReq () ;
+ my $r = shift ;
+ $r = HTML::Embperl::CurrReq () if (!(ref ($r) =~ /^HTML::Embperl/));
if ($HTML::Embperl::SessionMgnt && (!defined ($r) || !$r -> SubReq))
{
@@ -1766,6 +1772,20 @@
}
+#######################################################################################
+
+sub SetSessionCookie
+
+ {
+ my $name = $ENV{EMBPERL_COOKIE_NAME} || 'EMBPERL_UID' ;
+ my $domain = "; domain=$ENV{EMBPERL_COOKIE_DOMAIN}" if (exists ($ENV{EMBPERL_COOKIE_DOMAIN})) ;
+ my $path = "; path=$ENV{EMBPERL_COOKIE_PATH}" if (exists ($ENV{EMBPERL_COOKIE_PATH})) ;
+ my $expires = "; expires=$ENV{EMBPERL_COOKIE_EXPIRES}" if (exists ($ENV{EMBPERL_COOKIE_EXPIRES})) ;
+
+ Apache -> request -> header_out ("Set-Cookie" => "$name=" . (tied (%HTML::Embperl::udat) -> getid). "$domain$path$expires") ;
+ }
+
+
#######################################################################################
@@ -1883,13 +1903,10 @@
print HTML::Embperl::LOG "[$$]IMP: Create Imports for $caller from $package ($exports)\n" ;
no strict ;
-
- my $v ;
- my $k ;
- while (($k, $v) = each (%$exports))
+ foreach $k (keys %$exports)
{
- *{"$caller\:\:$k"} = $v ; #\&{"$package\:\:$k"} ;
+ *{"$caller\:\:$k"} = $exports -> {$k} ; #\&{"$package\:\:$k"} ;
print HTML::Embperl::LOG "[$$]IMP: Created Import for $package\:\:$k -> $caller\n" ;
}
1.35 +15 -5 embperl/Embperl.xs
Index: Embperl.xs
===================================================================
RCS file: /home/cvs/embperl/Embperl.xs,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- Embperl.xs 2000/10/17 08:23:04 1.34
+++ Embperl.xs 2000/11/07 11:28:18 1.35
@@ -20,6 +20,7 @@
MODULE = HTML::Embperl PACKAGE = HTML::Embperl PREFIX = embperl_
+PROTOTYPES: ENABLE
int
@@ -361,13 +362,22 @@
RETVAL
char *
-embperl_Path(r)
+embperl_Path(r,sPath=NULL)
tReq * r
+ char * sPath
CODE:
- if (r -> pConf && r -> pConf -> sPath)
- RETVAL = r -> pConf -> sPath ;
- else
- RETVAL = NULL;
+ RETVAL = NULL;
+ if (r -> pConf)
+ {
+ if (sPath)
+ {
+ if (r -> pConf -> sPath)
+ free (r -> pConf -> sPath) ;
+ r -> pConf -> sPath = sstrdup (sPath) ;
+ }
+ if (r -> pConf -> sPath)
+ RETVAL = r -> pConf -> sPath ;
+ }
OUTPUT:
RETVAL
1.39 +1 -1 embperl/EmbperlObject.pm
Index: EmbperlObject.pm
===================================================================
RCS file: /home/cvs/embperl/EmbperlObject.pm,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- EmbperlObject.pm 2000/10/17 07:25:15 1.38
+++ EmbperlObject.pm 2000/11/07 11:28:18 1.39
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: EmbperlObject.pm,v 1.38 2000/10/17 07:25:15 richter Exp $
+# $Id: EmbperlObject.pm,v 1.39 2000/11/07 11:28:18 richter Exp $
#
###################################################################################
1.53 +2 -0 embperl/MANIFEST
Index: MANIFEST
===================================================================
RCS file: /home/cvs/embperl/MANIFEST,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- MANIFEST 2000/10/17 08:23:05 1.52
+++ MANIFEST 2000/11/07 11:28:19 1.53
@@ -146,6 +146,7 @@
test/html/EmbperlObject/epopage1.htm
test/html/EmbperlObject/epodiv.htm
test/html/EmbperlObject/sub/subsub/eposubsub.htm
+test/html/EmbperlObject/sub/subsub/subsubsub/eposubsub.htm
test/html/EmbperlObject/eposubsub.htm
test/html/EmbperlObject/sub/epohead.htm
test/html/EmbperlObject/sub/epopage2.htm
@@ -241,6 +242,7 @@
test/cmp/epodiv.htm
test/cmp/epopage2.htm
test/cmp/eposubsub.htm
+test/cmp/eposubsub.htm3
test/cmp/epoobj1.htm
test/cmp/epoobj2.htm
test/cmp/epoobj3.htm
1.34 +15 -9 embperl/Makefile.PL
Index: Makefile.PL
===================================================================
RCS file: /home/cvs/embperl/Makefile.PL,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- Makefile.PL 2000/09/14 04:57:32 1.33
+++ Makefile.PL 2000/11/07 11:28:19 1.34
@@ -26,48 +26,48 @@
%neededmodules =
(
'mod_perl.c' => { name => 'perl_module',
- path => ['$apache_src/modules/perl/libperl.so', '$EPBINDIR/modules/libperl.so'],
+ path => ['$apache_src/modules/perl/libperl.so', '$EPBINDIR/modules/libperl.so', '$apache_src/mod_perl.so'],
win32path => ['$mpdll', '$mpdll/apachemoduleperl.dll', '$EPBINDIR/modules/apachemoduleperl.dll'],
file => 'libperl.so',
win32file => 'apachemoduleperl.dll',
},
'mod_dir.c' => { name => 'dir_module',
- path => ['$apache_src/modules/standard/mod_dir.so', '$EPBINDIR/modules/mod_dir.so'],
+ path => ['$apache_src/modules/standard/mod_dir.so', '$EPBINDIR/modules/mod_dir.so', '$apache_src/mod_dir.so'],
win32path => ['$apache_src/modules/standard/apachemoduledir.dll', '$EPBINDIR/modules/apachemoduledir.dll'],
file => 'mod_dir.so',
win32file => 'apachemoduledir.dll',
},
'mod_env.c' => { name => 'env_module',
- path => ['$apache_src/modules/standard/mod_env.so', '$EPBINDIR/modules/mod_env.so'],
+ path => ['$apache_src/modules/standard/mod_env.so', '$EPBINDIR/modules/mod_env.so', '$apache_src/mod_env.so'],
win32path => ['$apache_src/modules/standard/apachemoduleenv.dll', '$EPBINDIR/modules/apachemoduleenv.dll'],
file => 'mod_env.so',
win32file => 'apachemoduleenv.dll',
},
'mod_mime.c' => { name => 'mime_module',
- path => ['$apache_src/modules/standard/mod_mime.so', '$EPBINDIR/modules/mod_mime.so'],
+ path => ['$apache_src/modules/standard/mod_mime.so', '$EPBINDIR/modules/mod_mime.so', '$apache_src/mod_mime.so'],
win32path => ['$apache_src/modules/standard/apachemodulemime.dll', '$EPBINDIR/modules/apachemodulemime.dll'],
file => 'mod_mime.so',
win32file => 'apachemodulemime.dll',
},
'mod_alias.c' => { name => 'alias_module',
- path => ['$apache_src/modules/standard/mod_alias.so', '$EPBINDIR/modules/mod_alias.so'],
+ path => ['$apache_src/modules/standard/mod_alias.so', '$EPBINDIR/modules/mod_alias.so', '$apache_src/mod_alias.so'],
win32path => ['$apache_src/modules/standard/apachemodulealias.dll', '$EPBINDIR/modules/apachemodulealias.dll'],
file => 'mod_alias.so',
win32file => 'apachemodulealias.dll',
},
'mod_cgi.c' => { name => 'cgi_module',
- path => ['$apache_src/modules/standard/mod_cgi.so', '$EPBINDIR/modules/mod_cgi.so'],
+ path => ['$apache_src/modules/standard/mod_cgi.so', '$EPBINDIR/modules/mod_cgi.so', '$apache_src/mod_cgi.so'],
win32path => ['$apache_src/modules/standard/apachemodulecgi.dll', '$EPBINDIR/modules/apachemodulecgi.dll'],
file => 'mod_cgi.so',
win32file => 'apachemodulecgi.dll',
},
'mod_actions.c' => { name => 'action_module',
- path => ['$apache_src/modules/standard/mod_actions.so', '$EPBINDIR/modules/mod_actions.so'],
+ path => ['$apache_src/modules/standard/mod_actions.so', '$EPBINDIR/modules/mod_actions.so', '$apache_src/mod_actions.so'],
win32path => ['$apache_src/modules/standard/apachemoduleactions.dll', '$EPBINDIR/modules/apachemoduleactions.dll'],
file => 'mod_actions.so',
win32file => 'apachemoduleactions.dll',
@@ -467,6 +467,10 @@
{
$inc_dir = "$apache_src/include" ;
}
+ elsif (-e "$ENV{APACHE_HDR}/httpd.h")
+ {
+ $inc_dir = "$ENV{APACHE_HDR}" ;
+ }
if ($win32)
@@ -590,6 +594,7 @@
}
$EPHTTPD = "$apache_src/httpd" ;
+ $EPHTTPD = $ENV{EPHTTPD} if (defined ($ENV{EPHTTPD})) ;
$EPHTTPD = "$apache_src/httpsd" if (!-e $EPHTTPD && -e "$apache_src/httpsd") ;
if (!-e $EPHTTPD)
@@ -901,9 +906,10 @@
'INC' => $i,
'MAN3PODS' => {
'Embperl.pod' => 'blib/man3/HTML::Embperl.3',
- 'EmbperlD.pod' => 'blib/man3/HTML::EmbperlD.3'
+ 'EmbperlD.pod' => 'blib/man3/HTML::EmbperlD.3',
+ 'EmbperlObject.pm' => 'blib/man3/HTML::EmbperlObject.3',
},
- 'clean' => { FILES => 'dirent.h test/tmp/*' },
+ 'clean' => { FILES => 'dirent.h test/conf/httpd.conf test/tmp/*' },
'dist' => { COMPRESS => 'gzip', SUFFIX => 'gz'},
'dynamic_lib' => $dynlib,
'PREREQ_PM' => { 'File::Spec' => 0 },
1.101 +2 -0 embperl/TODO
Index: TODO
===================================================================
RCS file: /home/cvs/embperl/TODO,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -r1.100 -r1.101
--- TODO 2000/10/17 08:23:05 1.100
+++ TODO 2000/11/07 11:28:19 1.101
@@ -64,6 +64,8 @@
- Execute backtrace [Jon Brisbin 12.8.00]
+- pre header function [Alvar Freude 25.10.00]
+
Test
----
1.22 +1 -0 embperl/embperl.h
Index: embperl.h
===================================================================
RCS file: /home/cvs/embperl/embperl.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- embperl.h 2000/10/17 07:25:15 1.21
+++ embperl.h 2000/11/07 11:28:19 1.22
@@ -106,6 +106,7 @@
dbgBuildToken = 0x800000,
dbgParse = 0x1000000,
dbgObjectSearch = 0x2000000,
+ dbgCache = 0x4000000,
dbgAll = -1
} ;
1.31 +11 -0 embperl/ep.h
Index: ep.h
===================================================================
RCS file: /home/cvs/embperl/ep.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- ep.h 2000/10/17 07:02:02 1.30
+++ ep.h 2000/11/07 11:28:20 1.31
@@ -464,6 +464,17 @@
/* ---- from epeval.c ----- */
+int CallCV (/*i/o*/ register req * r,
+ /*in*/ const char * sArg,
+ /*in*/ CV * pSub,
+ /*in*/ int flags,
+ /*out*/ SV ** pRet) ;
+
+int EvalOnly (/*i/o*/ register req * r,
+ /*in*/ const char * sArg,
+ /*in*/ SV ** ppSV,
+ /*in*/ int flags,
+ /*in*/ const char * sName) ;
int EvalDirect (/*i/o*/ register req * r,
/*in*/ SV * pArg,
1.25 +35 -1 embperl/epdat.h
Index: epdat.h
===================================================================
RCS file: /home/cvs/embperl/epdat.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- epdat.h 2000/10/18 06:53:14 1.24
+++ epdat.h 2000/11/07 11:28:20 1.25
@@ -24,7 +24,30 @@
typedef struct tProcessor
{
- int (* pCompiler)(tReq *, tDomTree *, tNode) ;
+ int nProcessorNo ;
+ const char * sName ;
+ int (* pPreCompiler) (/*in*/ tReq * r,
+ /*in*/ struct tProcessor * pProcessor,
+ /*in*/ tDomTree ** ppDomTree,
+ /*in*/ SV ** ppPreCompResult,
+ /*out*/ SV ** ppCompResult) ;
+ int (* pCompiler) (/*in*/ tReq * r,
+ /*in*/ struct tProcessor * pProcessor,
+ /*in*/ tDomTree ** ppDomTree,
+ /*in*/ SV ** ppPreCompResult,
+ /*out*/ SV ** ppCompResult) ;
+ int (* pExecuter) (/*in*/ tReq * r,
+ /*in*/ struct tProcessor * pProcessor,
+ /*in*/ tDomTree ** pDomTree,
+ /*in*/ SV ** ppPreCompResult,
+ /*in*/ SV ** ppCompResult,
+ /*out*/ SV ** ppExecResult) ;
+
+ const char * sCacheKey ;
+ double nOutputExpiresIn ;
+ CV * pOutputExpiresCV ;
+
+ struct tProcessor * pNext ;
} tProcessor ;
/*-----------------------------------------------------------------*/
@@ -309,6 +332,7 @@
/* --- DomTree ---*/
+ tNode xDocument ;
tNode xCurrNode ;
tIndex xCurrDomTree ;
struct tTokenTable * pTokenTable ;
@@ -421,6 +445,7 @@
HV * pHeaderHash ;/* http headers */
#ifdef EP2
AV * pDomTreeAV ; /* holds all DomTrees alocated during the request */
+ AV * pCleanupAV ; /* set all sv's that are conatined in that array to undef after the whole request */
#endif
/* --- for statistics --- */
@@ -440,6 +465,15 @@
char op_mask_buf[MAXO + 100]; /* save buffer for opcode mask - maxo shouldn't differ from MAXO but leave room anyway (see BOOT:) */
HV * pImportStash ; /* stash for package, where new macros should be imported */
+
+#ifdef EP2
+
+ char * * pProg ; /* pointer into currently compiled code */
+ char * pProgRun ; /* pointer into currently compiled run code */
+ char * pProgDef ; /* pointer into currently compiled define code */
+
+#endif
+
} ;
1.25 +6 -6 embperl/epeval.c
Index: epeval.c
===================================================================
RCS file: /home/cvs/embperl/epeval.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- epeval.c 2000/10/17 07:02:03 1.24
+++ epeval.c 2000/11/07 11:28:20 1.25
@@ -104,7 +104,7 @@
GetLineNo (r) ;
if (r -> bDebug & dbgDefEval)
- lprintf (r, "[%d]DEF: Line %d: %s\n", r -> nPid, r -> Buf.nSourceline, sArg) ;
+ lprintf (r, "[%d]DEF: Line %d: %s\n", r -> nPid, r -> Buf.nSourceline, sArg?sArg:"<unknown>") ;
tainted = 0 ;
pCurrReq = r ;
@@ -192,7 +192,7 @@
EPENTRY (EvalAll) ;
if (r -> bDebug & dbgEval)
- lprintf (r, "[%d]EVAL< %s\n", r -> nPid, sArg) ;
+ lprintf (r, "[%d]EVAL< %s\n", r -> nPid, sArg?sArg:"<unknown>") ;
tainted = 0 ;
pCurrReq = r ;
@@ -306,7 +306,7 @@
------------------------------------------------------------------------------- */
-static int CallCV (/*i/o*/ register req * r,
+int CallCV (/*i/o*/ register req * r,
/*in*/ const char * sArg,
/*in*/ CV * pSub,
/*in*/ int flags,
@@ -331,7 +331,7 @@
EPENTRY (CallCV) ;
if (r -> bDebug & dbgEval)
- lprintf (r, "[%d]EVAL< %s\n", r -> nPid, sArg) ;
+ lprintf (r, "[%d]EVAL< %s\n", r -> nPid, sArg?sArg:"<unknown>") ;
tainted = 0 ;
pCurrReq = r ;
@@ -466,7 +466,7 @@
------------------------------------------------------------------------------- */
-static int EvalOnly (/*i/o*/ register req * r,
+int EvalOnly (/*i/o*/ register req * r,
/*in*/ const char * sArg,
/*in*/ SV ** ppSV,
/*in*/ int flags,
@@ -613,7 +613,7 @@
EPENTRY (CallCV) ;
if (r -> bDebug & dbgEval)
- lprintf (r, "[%d]EVAL< %s\n", r -> nPid, sArg) ;
+ lprintf (r, "[%d]EVAL< %s\n", r -> nPid, sArg?sArg:"<unknown>") ;
tainted = 0 ;
pCurrReq = r ;
1.7 +5 -0 embperl/epmacro.h
Index: epmacro.h
===================================================================
RCS file: /home/cvs/embperl/epmacro.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- epmacro.h 2000/09/11 09:53:30 1.6
+++ epmacro.h 2000/11/07 11:28:20 1.7
@@ -104,3 +104,8 @@
#define EPENTRY1N(func,arg1)
#define EPENTRY1S(func,arg1)
#endif
+
+
+
+#define AssignSVPtr(ppDst,pSrc) { if (*ppDst) SvREFCNT_dec (*ppDst) ; *ppDst = pSrc ; }
+
1.81 +57 -7 embperl/epmain.c
Index: epmain.c
===================================================================
RCS file: /home/cvs/embperl/epmain.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- epmain.c 2000/10/17 08:23:05 1.80
+++ epmain.c 2000/11/07 11:28:20 1.81
@@ -404,6 +404,15 @@
hv_clear (r -> pFormHash) ;
hv_clear (r -> pFormSplitHash) ;
+#ifdef HASHTEST
+ pHash = perl_get_hv (sFormHashName, FALSE) ;
+ if (pHash != r -> pFormHash)
+ {
+ strcpy (r -> errdat1, sFormHashName) ;
+ strcpy (r -> errdat2, " !!C-Adress differs from Perl-Adress!! in GetFormData" ) ;
+ LogError (r, rcHashError) ;
+ }
+#endif
if (nLen == 0)
return ok ;
@@ -1482,6 +1491,13 @@
LogError (r, rcArrayError) ;
return 1 ;
}
+
+ if (!(r -> pCleanupAV = newAV ()))
+ {
+ LogError (r, rcArrayError) ;
+ return 1 ;
+ }
+
#endif
rc = 0 ;
@@ -2279,6 +2295,17 @@
{
tFile * pFile ;
tFile * pNext ;
+ int i ;
+
+#ifdef HASHTEST
+ pHash = perl_get_hv (sFormHashName, FALSE) ;
+ if (pHash != r -> pFormHash)
+ {
+ strcpy (r -> errdat1, sFormHashName) ;
+ strcpy (r -> errdat2, " !!C-Adress differs from Perl-Adress!! in FreeRequest") ;
+ LogError (r, rcHashError) ;
+ }
+#endif
hv_clear (r -> pHeaderHash) ;
av_clear (r -> pFormArray) ;
@@ -2287,6 +2314,12 @@
hv_clear (r -> pFormSplitHash) ;
#ifdef EP2
av_clear (r -> pDomTreeAV) ;
+ for (i = 0 ; i < AvFILL (r -> pCleanupAV); i++)
+ {
+ sv_setsv (SvRV(*av_fetch (r -> pCleanupAV, i, 0)), &sv_undef) ;
+ }
+ av_clear (r -> pCleanupAV) ;
+
#endif
if ((pFile = r -> pFiles2Free))
{
@@ -2719,7 +2752,11 @@
#ifdef EP2
if (!bError && !r -> bEP1Compat)
- Node_toString (DomTree_self (r -> xCurrDomTree), r, r -> xDocument) ;
+ {
+ tDomTree * pDomTree = DomTree_self (r -> xCurrDomTree) ;
+ Node_toString (pDomTree, r, pDomTree -> xDocument) ;
+ }
+
if (!r -> bEP1Compat)
oputs (r, "\r\n") ;
#endif
@@ -2746,12 +2783,16 @@
l -> pLastBuf = r -> pLastBuf ;
l -> pFreeBuf = r -> pFreeBuf ;
l -> pLastFreeBuf= r -> pLastFreeBuf ;
+ l -> nSessionMgnt= r -> nSessionMgnt ;
#ifdef EP2
}
else
{
- if (!bError)
- Node_replaceChildWithNode (DomTree_self (r -> xCurrDomTree), r -> xDocument, DomTree_self (l -> xCurrDomTree), l -> xCurrNode) ;
+ if (!bError && !r -> pImportStash)
+ {
+ tDomTree * pDomTree = DomTree_self (r -> xCurrDomTree) ;
+ Node_replaceChildWithNode (pDomTree, pDomTree -> xDocument, DomTree_self (l -> xCurrDomTree), l -> xCurrNode) ;
+ }
}
#endif
}
@@ -2759,9 +2800,10 @@
{
oCommit (r, NULL) ;
#ifdef EP2
- if (!bError && !r -> bEP1Compat)
+ if (!bError && !r -> bEP1Compat && !r -> pImportStash)
{
- Node_toString (DomTree_self (r -> xCurrDomTree), r, r -> xDocument) ;
+ tDomTree * pDomTree = DomTree_self (r -> xCurrDomTree) ;
+ Node_toString (pDomTree, r, pDomTree -> xDocument) ;
oputs (r, "\r\n") ;
}
#endif
@@ -2775,7 +2817,10 @@
sv_setsv (pOut, &sv_undef) ;
#ifdef EP2
else if (!r -> bEP1Compat)
- Node_toString (DomTree_self (r -> xCurrDomTree), r, r -> xDocument) ;
+ {
+ tDomTree * pDomTree = DomTree_self (r -> xCurrDomTree) ;
+ Node_toString (pDomTree, r, pDomTree -> xDocument) ;
+ }
#endif
}
@@ -2867,7 +2912,12 @@
#ifdef EP2
if (!r -> bEP1Compat)
- rc = embperl_CompileDocument (r) ;
+ {
+ tProcessor p2 = {2, "Embperl", embperl_CompileProcessor, NULL, embperl_ExecuteProcessor, "", 0, NULL, NULL } ;
+ tProcessor p1 = {1, "Parser", embperl_ParseProcessor, NULL, NULL, "", 0, NULL, &p2 } ;
+
+ rc = embperl_CompileDocument (r, &p1) ;
+ }
else
{
clock_t cl1 = clock () ;
1.76 +33 -248 embperl/test.pl
Index: test.pl
===================================================================
RCS file: /home/cvs/embperl/test.pl,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- test.pl 2000/10/17 08:23:05 1.75
+++ test.pl 2000/11/07 11:28:21 1.76
@@ -119,7 +119,9 @@
'query_info' => 'sel=2&SEL1=B&SEL3=D&SEL4=cc',
},
'mix.htm' => { },
- 'binary.htm' => { },
+ 'binary.htm' => {
+ 'version' => 1, # needs print OUT
+ },
'nesting.htm' => {
'version' => 1,
},
@@ -191,18 +193,18 @@
'callsub.htm' => {
'repeat' => 2,
},
+ 'executesub.htm' => {
+ 'version' => 2,
+ 'repeat' => 2,
+ },
'importsub.htm' => {
- 'version' => 1,
'repeat' => 2,
},
'importsub2.htm' => {
- 'version' => 1,
},
'importmodule.htm' => {
- 'version' => 1,
},
'recursexec.htm' => {
- 'version' => 1,
},
'nph/div.htm' => {
'option' => '64',
@@ -351,47 +353,43 @@
'EmbperlObject/epopage1.htm' => {
'offline' => 0,
'cgi' => 0,
- 'version' => 1,
},
'EmbperlObject/epodiv.htm' => {
'offline' => 0,
'cgi' => 0,
- 'version' => 1,
},
'EmbperlObject/sub/epopage2.htm' => {
'offline' => 0,
'cgi' => 0,
- 'version' => 1,
},
'EmbperlObject/sub/epopage2.htm' => {
'offline' => 0,
'cgi' => 0,
- 'version' => 1,
},
'EmbperlObject/sub/subsub/eposubsub.htm' => {
'offline' => 0,
'cgi' => 0,
- 'version' => 1,
},
+ 'EmbperlObject/sub/subsub/subsubsub/eposubsub.htm' => {
+ 'offline' => 0,
+ 'cgi' => 0,
+ 'cmpext' => '3',
+ },
'EmbperlObject/sub/eponotfound.htm' => {
'offline' => 0,
'cgi' => 0,
- 'version' => 1,
},
'EmbperlObject/obj/epoobj1.htm' => {
'offline' => 0,
'cgi' => 0,
- 'version' => 1,
},
'EmbperlObject/obj/epoobj2.htm' => {
'offline' => 0,
'cgi' => 0,
- 'version' => 1,
},
'EmbperlObject/obj/epoobj3.htm' => {
'offline' => 0,
'cgi' => 0,
- 'version' => 1,
},
'EmbperlObject/obj/epoobj4.htm' => {
'offline' => 0,
@@ -401,12 +399,10 @@
'EmbperlObject/base2/epostopdir.htm' => {
'offline' => 0,
'cgi' => 0,
- 'version' => 1,
},
'EmbperlObject/base3/epobaselib.htm' => {
'offline' => 0,
'cgi' => 0,
- 'version' => 1,
},
) ;
@@ -417,223 +413,6 @@
}
-=pod
-@tests = (
- 'ascii',
- 'pure.htm',
- 'plain.htm',
- 'plain.htm',
- 'plain.htm',
- 'plainblock.htm',
- 'plainblock.htm',
- 'error.htm???8',
- 'error.htm???8',
- 'error.htm???8',
- 'unclosed.htm???1',
-# 'errorright.htm???1',
- 'notfound.htm???1',
- 'notallow.xhtm???1',
- 'noerr/noerrpage.htm???8?2',
- 'errdoc/errdoc.htm???8?262144',
- 'errdoc/epl/errdoc2.htm???8?262144',
- 'rawinput/rawinput.htm????16',
- 'var.htm',
- 'varerr.htm???-1',
- 'varerr.htm???2',
- 'escape.htm',
- 'escape.htm',
- 'spaces.htm',
- 'tagscan.htm',
- 'tagscan.htm??1',
- 'if.htm',
- 'ifperl.htm',
- 'loop.htm?erstes=Hallo&zweites=Leer+zeichen&drittes=%21%22%23%2a%2B&erstes=Wert2',
- 'loopperl.htm?erstes=Hallo&zweites=Leer+zeichen&drittes=%21%22%23&erstes=Wert2',
- 'table.htm',
- 'table.htm??1',
- 'lists.htm?sel=2&SEL1=B&SEL3=D&SEL4=cc',
- 'mix.htm',
- 'nesting.htm',
- 'object.htm???2',
- 'discard.htm???12',
- 'input.htm?feld5=Wert5&feld6=Wert6&feld7=Wert7&feld8=Wert8&cb5=cbv5&cb6=cbv6&cb7=cbv7&cb8=cbv8&cb9=ncbv9&cb10=ncbv10&cb11=ncbv11&mult=Wert3&mult=Wert6&esc=a<b&escmult=a>b&escmult=Wert3',
- 'hidden.htm?feld1=Wert1&feld2=Wert2&feld3=Wert3&feld4=Wert4',
- 'java.htm',
- 'inputjava.htm',
- 'post.htm',
- 'upload.htm?multval=A&multval=B&multval=C&single=S',
- 'reqrec.htm',
- 'reqrec.htm',
- 'include.htm',
- 'includeerr1.htm???1',
- 'includeerr2.htm???4',
- 'registry/Execute.htm',
- 'registry/errpage.htm???16',
- 'registry/tied.htm???3',
- 'registry/tied.htm???3',
-# 'registry/subreq2.htm',
- 'callsub.htm',
- 'callsub.htm',
- 'importsub.htm',
- 'importsub.htm',
- 'importsub2.htm',
- 'importmodule.htm',
- 'recursexec.htm',
- 'nph/div.htm????64',
- 'nph/npherr.htm???8?64',
- 'nph/nphinc.htm????64',
- 'sub.htm',
- 'sub.htm',
- 'exit.htm',
- 'exit2.htm',
- 'exit3.htm',
- 'chdir.htm?a=1&b=2&c=&d=&f=5&g&h=7&=8&=',
- 'chdir.htm?a=1&b=2&c=&d=&f=5&g&h=7&=8&=',
- 'allform/allform.htm?a=1&b=2&c=&d=&f=5&g&h=7&=8&=???8192',
- 'stdout/stdout.htm????16384',
- 'nochdir/nochdir.htm?a=1&b=2???384',
- 'match/div.htm',
- 'match/div.asc',
- 'http.htm',
- 'div.htm',
- 'taint.htm???1',
- 'ofunc/div.htm',
- 'safe/safe.htm???-1?4',
- 'safe/safe.htm???-1?4',
- 'safe/safe.htm???-1?4',
- 'opmask/opmask.htm???-1?12?TEST',
- 'opmask/opmasktrap.htm???2?12?TEST',
- 'mdatsess.htm?cnt=0',
- 'setsess.htm?a=1',
- 'mdatsess.htm?cnt=1',
- 'getnosess.htm?nocookie=2',
- 'mdatsess.htm?cnt=2',
- 'getsess.htm',
- 'mdatsess.htm?cnt=3',
- 'execgetsess.htm',
- 'registry/reggetsess.htm',
- 'getsess.htm',
- 'delsess.htm',
- 'getdelsess.htm',
- 'clearsess.htm',
- 'EmbperlObject/epopage1.htm',
- 'EmbperlObject/epodiv.htm',
- 'EmbperlObject/sub/epopage2.htm',
- 'EmbperlObject/sub/epopage2.htm',
- 'EmbperlObject/sub/eponotfound.htm',
- 'EmbperlObject/obj/epoobj1.htm',
- 'EmbperlObject/obj/epoobj2.htm',
- 'EmbperlObject/obj/epoobj3.htm',
- 'EmbperlObject/obj/epoobj4.htm',
- 'EmbperlObject/base2/epostopdir.htm',
- 'EmbperlObject/base3/epobaselib.htm',
- ) ;
-
-@tests2 = (
- 'ascii',
-# 'tmp/header.htm',
- 'pure.htm',
-## 'plainlong.htm',
-## 'plainlong.htm',
-## 'plainlong.htm',
-## 'plainlong.htm',
- 'plain.htm',
- 'plain.htm',
- 'plain.htm',
- 'plainblock.htm',
- 'plainblock.htm',
- 'error.htm???7',
- 'error.htm???7',
- 'error.htm???7',
- 'errormismatch.htm???1',
- 'errormismatchcmd.htm???1',
- 'unclosed.htm???1',
-# 'errorright.htm???1',
- 'notfound.htm???1',
- 'notallow.xhtm???1',
-## 'noerr/noerrpage.htm???6?2',
-## 'errdoc/errdoc.htm???8?262144',
-## 'rawinput/rawinput.htm????16',
- 'var.htm',
- 'varerr.htm???-1',
-## 'varerr.htm???2',
- 'escape.htm',
- 'escape.htm',
-## 'spaces.htm',
- 'tagscan.htm',
- 'tagscan.htm??1',
- 'if.htm',
- 'ifperl.htm',
- 'loop.htm?erstes=Hallo&zweites=Leer+zeichen&drittes=%21%22%23%2a%2B&erstes=Wert2',
- 'loop.htm?erstes=Hallo&zweites=Leer+zeichen&drittes=%21%22%23%2a%2B&erstes=Wert2',
- 'loopperl.htm?erstes=Hallo&zweites=Leer+zeichen&drittes=%21%22%23&erstes=Wert2',
- 'table.htm',
- 'table.htm??1',
- 'lists.htm?sel=2&SEL1=B&SEL3=D&SEL4=cc',
- 'lists.htm?sel=2&SEL1=B&SEL3=D&SEL4=cc',
- 'mix.htm',
-## 'nesting.htm',
- 'object.htm',
-## 'discard.htm???12',
- 'input.htm?feld5=Wert5&feld6=Wert6&feld7=Wert7&feld8=Wert8&cb5=cbv5&cb6=cbv6&cb7=cbv7&cb8=cbv8&cb9=ncbv9&cb10=ncbv10&cb11=ncbv11&mult=Wert3&mult=Wert6&esc=a<b&escmult=a>b&escmult=Wert3',
- 'hidden.htm?feld1=Wert1&feld2=Wert2&feld3=Wert3&feld4=Wert4',
- 'java.htm',
- 'inputjava.htm',
- 'post.htm',
- 'upload.htm?multval=A&multval=B&multval=C&single=S',
- 'reqrec.htm',
- 'reqrec.htm',
- 'rawinput/include.htm????16',
- 'includeerr1.htm???1',
- 'includeerr2.htm???1',
- 'registry/Execute.htm',
-## 'registry/errpage.htm???16',
- 'registry/tied.htm???3',
- 'registry/tied.htm???3',
-## 'callsub.htm',
-## 'callsub.htm',
-## 'importsub.htm',
-## 'importsub.htm',
-## 'importsub2.htm',
-## 'importmodule.htm',
-## 'recursexec.htm',
- 'nph/div.htm????64',
-## 'nph/npherr.htm???8?64',
- 'nph/nphinc.htm????64',
- 'sub.htm',
- 'sub.htm',
-## 'exit.htm',
-## 'exit2.htm',
-## 'exit3.htm',
- 'chdir.htm?a=1&b=2&c=&d=&f=5&g&h=7&=8&=',
- 'chdir.htm?a=1&b=2&c=&d=&f=5&g&h=7&=8&=',
- 'allform/allform.htm?a=1&b=2&c=&d=&f=5&g&h=7&=8&=???8192',
-## 'stdout/stdout.htm????16384',
- 'nochdir/nochdir.htm?a=1&b=2???384',
- 'match/div.htm',
- 'match/div.asc',
-## 'http.htm',
- 'div.htm',
- 'taint.htm???1',
- 'ofunc/div.htm',
-## 'safe/safe.htm???-1?4',
-## 'safe/safe.htm???-1?4',
-## 'safe/safe.htm???-1?4',
-## 'opmask/opmask.htm???-1?12?TEST',
-## 'opmask/opmasktrap.htm???2?12?TEST',
- 'mdatsess.htm?cnt=0',
- 'setsess.htm?a=1',
- 'mdatsess.htm?cnt=1',
- 'getnosess.htm?nocookie=2',
- 'mdatsess.htm?cnt=2',
- 'getsess.htm',
- 'mdatsess.htm?cnt=3',
- 'execgetsess.htm',
- 'clearsess.htm',
- 'EmbperlObject/epopage1.htm',
-## 'EmbperlObject/sub/epopage2.htm',
- ) ;
-=cut
# avoid some warnings:
@@ -683,7 +462,7 @@
print "\nloading... ";
- $defaultdebug = 0x3f85ffd ;
+ $defaultdebug = 0x7f85ffd ;
#$defaultdebug = 1 ;
#### setup paths #####
@@ -750,8 +529,8 @@
#### setup path in URL ####
-$embploc = 'embperl/' ;
-$cgiloc = 'cgi-bin/' ;
+$embploc = 'embperl' ;
+$cgiloc = 'cgi-bin' ;
$port = $EPPORT ;
$host = 'localhost' ;
@@ -776,7 +555,6 @@
print "-f file to use for config.pl\n" ;
print "-x do not start httpd\n" ;
print "-u use unique filenames\n" ;
- print "-n do not check httpd errorlog\n" ;
print "-q set debug to 0\n" ;
print "-i ignore errors\n" ;
print "-t list tests\n" ;
@@ -969,7 +747,7 @@
if (!$upload)
{
- $url = new URI::URL("http://$host:$port/$loc$file?$query");
+ $url = new URI::URL("http://$host:$port/$loc/$file?$query");
$request = new HTTP::Request($content?'POST':'GET', $url);
$request -> header ('Cookie' => $cookie) if ($cookie && !($query =~ /nocookie/)) ;
@@ -980,7 +758,7 @@
{
my @q = split (/\&|=/, $query) ;
- $request = POST ("http://$host:$port/$loc$file",
+ $request = POST ("http://$host:$port/$loc/$file",
Content_Type => 'form-data',
Content => [ upload => [undef, '12upload-filename',
'Content-type' => 'test/plain',
@@ -1389,7 +1167,7 @@
$err = CmpFiles ($outfile, $org) if ($err == 0) ;
print "ok\n" unless ($err) ;
- if ($err == 0)
+ if ($err == 0 || $opt_ignoreerror)
{
$txt2 = "$txt from memory...";
$txt2 .= ' ' x (30 - length ($txt2)) ;
@@ -1410,7 +1188,7 @@
print "ok\n" unless ($err) ;
}
- if ($err == 0)
+ if ($err == 0 || $opt_ignoreerror)
{
$txt2 = "$txt to memory...";
$txt2 .= ' ' x (30 - length ($txt2)) ;
@@ -1436,7 +1214,7 @@
print "ok\n" unless ($err) ;
}
- if ($err == 0)
+ if ($err == 0 || $opt_ignoreerror)
{
$txt2 = "$txt from/to memory...";
$txt2 .= ' ' x (30 - length ($txt2)) ;
@@ -1480,7 +1258,7 @@
$seen{"o:$src"} = 1 ;
- if ($err == 0)
+ if ($err == 0 || $opt_ignoreerror)
{
$txt2 = "$txt to memory...";
$txt2 .= ' ' x (30 - length ($txt2)) ;
@@ -1515,7 +1293,7 @@
foreach $src ('EmbperlObject/epopage1.htm', 'EmbperlObject/sub/epopage2.htm', 'EmbperlObject/obj/epoobj3.htm')
{
- if ($err == 0 && $version == 1)
+ if ($err == 0 || $opt_ignoreerror) # && $version == 1)
{
$src =~ m#^.*/(.*?)$# ;
$org = "$cmppath/$1" ;
@@ -1553,6 +1331,8 @@
close STDERR ;
open (STDERR, ">&SAVEERR") ;
}
+
+ $err = 0 if ($opt_ignoreerror) ;
#############
#
@@ -1725,7 +1505,12 @@
$debug = $test -> {debug} || $defaultdebug ;
$page = "$inpath/$file" ;
- $page = "$inpath$testversion/$file" if (-e "$inpath$testversion/$file") ;
+ $locver = '' ;
+ if (-e "$inpath$testversion/$file")
+ {
+ $locver = $testversion ;
+ $page = "$inpath$testversion/$file" ;
+ }
if ($opt_nostart)
{
$notseen = 0 ;
@@ -1764,18 +1549,17 @@
$n_req++ ;
$t1 = HTML::Embperl::Clock () ;
- $page = "$inpath/$file" ;
$file .= '-1' if ($opt_ep1 && -e "$page-1") ;
if (defined ($opt_ab))
{
$opt_ab = 10 if (!$opt_ab) ;
- my $cmd = "ab -n $opt_ab 'http://$host:$port/$loc$file?$test->{query_info}'";
+ my $cmd = "ab -n $opt_ab 'http://$host:$port/$loc$locver/$file?$test->{query_info}'";
print "$cmd\n" ;
system ($cmd) and die "Cannot start ab ($!)" ;
}
else
{
- $m = REQ ($loc, $file, $test -> {query_info}, $outfile, $content, $upload) ;
+ $m = REQ ("$loc$locver", $file, $test -> {query_info}, $outfile, $content, $upload) ;
}
$t_req += HTML::Embperl::Clock () - $t1 ;
@@ -1805,6 +1589,7 @@
$org = "$cmppath/$1" ;
$org = "$cmppath$testversion/$1" if (-e "$cmppath$testversion/$1") ;
$org .= '56' if ($file eq 'varerr.htm' && $^V && $^V ge v5.6.0) ;
+ $org .= $test -> {cmpext} if ($test -> {cmpext}) ;
#$org .= '-1' if ($opt_ep1 && -e "$org-1") ;
#print "Compare $page with $org\n" ;
1.7 +8 -0 embperl/typemap
Index: typemap
===================================================================
RCS file: /home/cvs/embperl/typemap,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- typemap 2000/10/17 12:59:16 1.6
+++ typemap 2000/11/07 11:28:21 1.7
@@ -3,8 +3,16 @@
tReq * T_PTROBJ_REQ
tFile * T_PTROBJ_FILE
tDomNode * T_PTROBJ_DOMNODE
+AV * T_MYAVREF
+HV * T_MYHVREF
INPUT
+T_MYAVREF
+ $var = (AV *)SvRV($arg);
+
+T_MYHVREF
+ $var = (HV *)SvRV($arg);
+
T_PTROBJ_CONF
if (sv_derived_from ($arg, \"HTML::Embperl::Conf\"))
$var = (tConf *)(SvIV((SV *)SvRV($arg))) ;
1.5 +4 -0 embperl/Embperl/Session.pm
Index: Session.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Session.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Session.pm 2000/08/18 09:20:35 1.4
+++ Session.pm 2000/11/07 11:28:27 1.5
@@ -367,8 +367,12 @@
}
$self->save;
+ {
+ local $SIG{__WARN__} = 'IGNORE' ;
+ local $SIG{__DIE__} = 'IGNORE' ;
eval { $self -> {object_store} -> close } ; # Try to close file storage
$@ = "" ;
+ }
$self->release_all_locks;
$self->{'status'} = 0 ;
1.4 +1 -1 embperl/test/cmp/Execute.htm
Index: Execute.htm
===================================================================
RCS file: /home/cvs/embperl/test/cmp/Execute.htm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Execute.htm 1999/10/05 06:02:01 1.3
+++ Execute.htm 2000/11/07 11:28:30 1.4
@@ -2,7 +2,7 @@
<H1> 1.) Include from memory</H1>
<P>Here is some text</P>
<H1> 2.) Include from memory with some Embperl code</H1>
-<table><tr><td>a1</td><td>b2</td><td>c3</td></tr></table></P>
+^<table> ?<tr> ?<td>a1</td> ?<td>b2</td> ?<td>c3</td> ?</tr> ?</table> ?</P>
<H1> 3.) Include from memory with passing of variables</H1>
<P>Transfer some vars Some Var !</P>
<H1> 4.) Change the variable, but not the code</H1>
1.2 +14 -26 embperl/test/cmp/epodiv.htm
Index: epodiv.htm
===================================================================
RCS file: /home/cvs/embperl/test/cmp/epodiv.htm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- epodiv.htm 2000/08/21 04:22:49 1.1
+++ epodiv.htm 2000/11/07 11:28:31 1.2
@@ -74,7 +74,7 @@
<P>$tabmode = default <P>
-<table border="2" width="100%">
+<table border="1" width="100%">
<tr>
<td>a1/1 </td>
</tr>
@@ -96,20 +96,15 @@
<table border="2" width="100%">
<tr>
- <th>1</th>
- <th>2</th>
- <th>3</th>
- </tr>
- <tr>
<td>a1/1 </td>
</tr>
-
+
<tr>
<td>a2/1 </td>
<td>a2/2 </td>
</tr>
-
+
<tr>
<td>a3/1 </td>
@@ -119,24 +114,17 @@
</tr>
</table>
-<table border="2" width="100%">
+<table border="3" width="100%">
<tr>
- <th>b3/1</th>
-
- <th>b3/2</th>
-
- <th>b3/3</th>
- </tr>
- <tr>
<td>a1/1 </td>
</tr>
-
+
<tr>
<td>a2/1 </td>
<td>a2/2 </td>
</tr>
-
+
<tr>
<td>a3/1 </td>
@@ -146,10 +134,10 @@
</tr>
</table>
-<table>
+<table border="4" >
<tr>
<td>
- <table>
+ <table border="5" >
<tr>
<td>b1/1 </td>
</tr>
@@ -174,7 +162,7 @@
<tr>
<td>
- <table>
+ <table border="5" >
<tr>
<td>b1/1 </td>
</tr>
@@ -197,7 +185,7 @@
a2/1 </td>
<td>
- <table>
+ <table border="5" >
<tr>
<td>b1/1 </td>
</tr>
@@ -222,7 +210,7 @@
<tr>
<td>
- <table>
+ <table border="5" >
<tr>
<td>b1/1 </td>
</tr>
@@ -245,7 +233,7 @@
a3/1 </td>
<td>
- <table>
+ <table border="5" >
<tr>
<td>b1/1 </td>
</tr>
@@ -268,7 +256,7 @@
a3/2 </td>
<td>
- <table>
+ <table border="5" >
<tr>
<td>b1/1 </td>
</tr>
@@ -292,7 +280,7 @@
</tr>
</table>
-^<P>1\.3.*?<P>
+<P>1.3b7_dev<P>
<P>17<P>
<P>1<P>
1.4 +25 -24 embperl/test/cmp/importsub.htm
Index: importsub.htm
===================================================================
RCS file: /home/cvs/embperl/test/cmp/importsub.htm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- importsub.htm 1999/12/31 13:51:49 1.3
+++ importsub.htm 2000/11/07 11:28:31 1.4
@@ -10,53 +10,54 @@
First sub:
-
-<h2>1.) Here goes some normal html text <h2>
-
+*1*
+*1*<h2>1.) Here goes some normal html text <h2>
+*1*
Second sub:
-
-
-2.) Here comes some perl:
-foo = Hello world<br>
-testdata = <br>
-
+*2*
+*2*2.) Here comes some perl:
+*2*
+*2**2*
+*2*foo = Hello world<br>
+*2*testdata = <br>
+*2*
And now a table splitted into several subs:
<table>
<tr><th>1</th><th>2></th></tr>
<tr>
-
-
-<td>a1<td>
-
+*4*
+*4*<td>a1<td>
+*4*
-<td>a2<td>
-
+*4*
+*4*<td>a2<td>
+*4*
</tr>
<tr>
-
-
-<td>b1<td>
-
+*4*
+*4*<td>b1<td>
+*4*
-<td>b2<td>
-
+*4*
+*4*<td>b2<td>
+*4*
</tr>
</table>
req_rec sub:
^<h2>\$req_rec =.*?\$\$req_rec =
-
-
-^<h2>\$req_rec =.*?\$\$req_rec =
+*6*
+^\*6\*<h2>\$req_rec =.*?\$\$req_rec =
+*6*
And done!
1.3 +22 -21 embperl/test/cmp/importsub2.htm
Index: importsub2.htm
===================================================================
RCS file: /home/cvs/embperl/test/cmp/importsub2.htm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- importsub2.htm 1999/10/05 06:02:09 1.2
+++ importsub2.htm 2000/11/07 11:28:32 1.3
@@ -10,43 +10,44 @@
Second sub:
-
-2.) Here comes some perl:
-
-foo = Hello world<br>
-testdata = <br>
-
+*2*
+*2*2.) Here comes some perl:
+*2*
+*2**2*
+*2*foo = Hello world<br>
+*2*testdata = <br>
+*2*
First sub:
-
-<h2>1.) Here goes some normal html text <h2>
-
+*1*
+*1*<h2>1.) Here goes some normal html text <h2>
+*1*
And now a table splitted into several subs:
<table>
<tr><th>1</th><th>2></th></tr>
<tr>
-
-
-<td>2a1<td>
+*4*
+*4*<td>2a1<td>
+*4*
-
-<td>2a2<td>
-
+*4*
+*4*<td>2a2<td>
+*4*
</tr>
<tr>
-
-
-<td>2b1<td>
-
-
+*4*
+*4*<td>2b1<td>
+*4*
-<td>2b2<td>
+*4*
+*4*<td>2b2<td>
+*4*
</tr>
</table>
1.1 embperl/test/cmp/eposubsub.htm3
Index: eposubsub.htm3
===================================================================
<html>
<head>
<title>Example</title>
</head>
<body>
<h1>another head from sub</h1>
--->
eposubsub in sub/subsub/subsubsub
../eposubsub
--->
eposubsub in sub/subsub
../*
eposubsub in base dir
epopage1
PAGE 1
../epopage1
PAGE 1
epopage2
PAGE 2
../epopage2
PAGE 2
../sub/epopage2
PAGE 2
../eposubsub
eposubsub in base dir
<---
<---
<hr> Footer <hr>
</body>
</html>
1.25 +8 -0 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
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- httpd.conf.src 2000/09/12 12:49:55 1.24
+++ httpd.conf.src 2000/11/07 11:28:34 1.25
@@ -101,6 +101,7 @@
Alias /embperl/sub/ $EPPATH/test/html/
Alias /embperl/ $EPPATH/test/html/
+Alias /embperl2/ $EPPATH/test/html2/
Alias /eg/ $EPPATH/eg/
<Location /embperl/sub>
@@ -111,6 +112,13 @@
</Location>
<Location /embperl>
+SetHandler perl-script
+PerlHandler HTML::Embperl
+Options ExecCGI
+PerlSetEnv LOC embperl
+</Location>
+
+<Location /embperl2>
SetHandler perl-script
PerlHandler HTML::Embperl
Options ExecCGI
1.5 +2 -2 embperl/test/html/importmodule.htm
Index: importmodule.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/importmodule.htm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- importmodule.htm 1999/10/05 06:03:43 1.4
+++ importmodule.htm 2000/11/07 11:28:35 1.5
@@ -8,10 +8,10 @@
<h1>Tests for Embperl - Importing from a Perl module</h1>
-[-
+[!
use lib qw{ . } ;
use subimp ;
--]
+!]
First sub:
[- tfirst -]
1.3 +1 -1 embperl/test/html/importsub2.htm
Index: importsub2.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/importsub2.htm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- importsub2.htm 1999/10/05 06:03:43 1.2
+++ importsub2.htm 2000/11/07 11:28:35 1.3
@@ -8,7 +8,7 @@
<h1>Tests for Embperl - Importing subs</h1>
-[- Execute({inputfile => 'subimp.htm', import => 1}) -]
+[! Execute({inputfile => 'subimp.htm', import => 1}) !]
Second sub:
1.6 +22 -22 embperl/test/html/subimp.htm
Index: subimp.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/subimp.htm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- subimp.htm 2000/01/05 05:41:39 1.5
+++ subimp.htm 2000/11/07 11:28:35 1.6
@@ -1,45 +1,45 @@
[###### first sub #####]
[$sub tfirst$]
-
-<h2>1.) Here goes some normal html text <h2>
-
+*1*
+*1*<h2>1.) Here goes some normal html text <h2>
+*1*
[$endsub$]
[###### second sub #####]
[$sub tsecond $]
-
-2.) Here comes some perl:
-
-[- $foo = 'Hello world' -]
-
-foo = [+ $foo +]<br>
-testdata = [+ $testdata +]<br>
-
+*2*
+*2*2.) Here comes some perl:
+*2*
+*2*[- $foo = 'Hello world' -]
+*2*
+*2*foo = [+ $foo +]<br>
+*2*testdata = [+ $testdata +]<br>
+*2*
[$endsub$]
[###### table header #####]
[$sub tabheader $]
-<table>
-<tr><th>1</th><th>2></th></tr>
-<tr>
+<txable>
+<txr><th>1</th><th>2></th></txr>
+<txr>
[$endsub$]
[###### table cell #####]
[$sub tabcell $]
-
-<td>[+ $_[0] -> [$row][$col] +]<td>
-
+*4*
+*4*<td>[+ $_[0] -> [$row][$col] +]<td>
+*4*
[$endsub$]
[###### table footer #####]
[$sub tabfooter $]
-</tr>
-</table>
+</txr>
+</txable>
[$endsub$]
[###### req_rec #####]
[$sub trr$]
-
-<h2>$req_rec = [+ $req_rec +] $$req_rec = [+ $$req_rec +]<h2>
-
+*6*
+*6*<h2>$req_rec = [+ $req_rec +] $$req_rec = [+ $$req_rec +]<h2>
+*6*
[$endsub$]
1.5 +10 -7 embperl/test/html/subimp.pm
Index: subimp.pm
===================================================================
RCS file: /home/cvs/embperl/test/html/subimp.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- subimp.pm 1999/07/06 12:30:51 1.4
+++ subimp.pm 2000/11/07 11:28:35 1.5
@@ -68,6 +68,16 @@
[$endsub$]
+
+[###### table cell #####]
+[$sub tabcell $]
+
+
+<td>[+ $_[0] -> [$row][$col] +]<td>
+
+[$endsub$]
+
+
[###### table header #####]
[$sub tabheader $]
@@ -78,13 +88,6 @@
[$endsub$]
-[###### table cell #####]
-[$sub tabcell $]
-
-
-<td>[+ $_[0] -> [$row][$col] +]<td>
-
-[$endsub$]
[###### table footer #####]
[$sub tabfooter $]
1.2 +7 -15 embperl/test/html/EmbperlObject/epodiv.htm
Index: epodiv.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/EmbperlObject/epodiv.htm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- epodiv.htm 2000/08/21 04:22:50 1.1
+++ epodiv.htm 2000/11/07 11:28:37 1.2
@@ -6,7 +6,7 @@
<body>
-[$ var $a $b $c $d $e $i $ii $v $k $fv @a @b %h @c @ii %hash $]
+[$ var $a $b $c $d $e $i $j $ii $v $k $fv @a %a @b %h @c @ii %hash $wv $wk $]
Here it starts with some HTML Text<P>
@@ -164,7 +164,7 @@
<P>$tabmode = default <P>
-<table border="2" width="100%">
+<table border="1" width="100%">
<tr>
<td>[+ $a[$row][$col] +] </td>
</tr>
@@ -172,28 +172,20 @@
<table border="2" width="100%">
<tr>
- <th>1</th>
- <th>2</th>
- <th>3</th>
- </tr>
- <tr>
<td>[+ $a[$row][$col] +] </td>
</tr>
</table>
-<table border="2" width="100%">
+<table border="3" width="100%">
<tr>
- <th>[+ $b[2][$col] +]</th>
- </tr>
- <tr>
<td>[+ $a[$row][$col] +] </td>
</tr>
</table>
-<table>
+<table border="4" >
<tr>
<td>
- <table>
+ <table border="5" >
<tr>
<td>[+ $b[$row][$col] +] </td>
</tr>
@@ -249,7 +241,7 @@
[- $i++ -]
[$ until $i > $#a $]
-[$ foreach $v @a $]
+[$ foreach $v (@a) $]
[+ $v +] <br>
[$ endforeach $]
@@ -278,7 +270,7 @@
[$ foreach $fv (1, 3, 5, 7, 9) $]
[+ $fv +] <br>
[$ endforeach $]
- [$ foreach $fv () $]
+ [$ foreach $fv (()) $]
[+ $fv +] <br>
[$ while ($wv, $wk) = each (%h) $]
[+ "$wv = $wk" +]<br>
1.1 embperl/test/html/EmbperlObject/sub/subsub/subsubsub/eposubsub.htm
Index: eposubsub.htm
===================================================================
--->
eposubsub in sub/subsub/subsubsub
../eposubsub
[- Execute ('../eposubsub.htm') ; -]
<---
1.3 +1 -1 embperl/test/html/registry/reggetsess.htm
Index: reggetsess.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/registry/reggetsess.htm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- reggetsess.htm 2000/09/11 09:53:38 1.2
+++ reggetsess.htm 2000/11/07 11:28:39 1.3
@@ -31,7 +31,7 @@
HTML::Embperl::Execute ({input => \$tst1,
mtime => 1,
- inputfile => 'Some text',
+ inputfile => 'Some text session test',
}) ;