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 2001/06/05 13:58:17 UTC
cvs commit: embperl Embperl.pm epmacro.h epmain.c test.pl
richter 01/06/05 04:58:16
Modified: . Tag: Embperl2c Embperl.pm epmacro.h epmain.c
test.pl
Log:
Embperl 2 - source sync with 1.3.3
Revision Changes Path
No revision
No revision
1.118.4.43 +43 -59 embperl/Embperl.pm
Index: Embperl.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl.pm,v
retrieving revision 1.118.4.42
retrieving revision 1.118.4.43
diff -u -r1.118.4.42 -r1.118.4.43
--- Embperl.pm 2001/05/26 15:45:08 1.118.4.42
+++ Embperl.pm 2001/06/05 11:58:09 1.118.4.43
@@ -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.42 2001/05/26 15:45:08 richter Exp $
+# $Id: Embperl.pm,v 1.118.4.43 2001/06/05 11:58:09 richter Exp $
#
###################################################################################
@@ -51,42 +51,16 @@
$cwd
- $escmode
- %fdat
- %udat
- %mdat
- @ffld
- %fsplitdat
- %idat
-
- $tabmode
- $escmode
- $row
- $cnt
- $col
- $maxrow
- $maxcol
-
$evalpackage
- $optRedirectStdout
- $optDisableFormData
- $optDisableVarCleanup
- $optAllowZeroFilesize
-
- $dbgShowCleanup
- $dbgLogLink
- $dbgForm
- $dbgSession
-
$SessionMgnt
$DefaultIDLength
- $req_rec
-
- %http_headers_out
-
$pathsplit
+
+ @AliasScalar
+ @AliasHash
+ @AliasArray
) ;
@@ -256,6 +230,40 @@
'INPU:' => '#008040',
) ;
+#######################################################################################
+
+BEGIN
+ {
+ @AliasScalar = qw{row col cnt maxrow maxcol tabmode escmode req_rec
+ dbgAll dbgAllCmds dbgCmd dbgDefEval dbgEarlyHttpHeader
+ dbgEnv dbgEval dbgFlushLog dbgFlushOutput dbgForm
+ dbgFunc dbgHeadersIn dbgImport dbgInput dbgLogLink
+ dbgMem dbgProfile dbgShowCleanup dbgSource dbgStd
+ dbgSession dbgTab dbgWatchScalar dbgParse dbgObjectSearch
+ optDisableChdir optDisableEmbperlErrorPage optReturnError optDisableFormData
+ optDisableHtmlScan optDisableInputScan optDisableMetaScan optDisableTableScan
+ optDisableSelectScan optDisableVarCleanup optEarlyHttpHeader optOpcodeMask
+ optRawInput optSafeNamespace optSendHttpHeader optAllFormData
+ optRedirectStdout optUndefToEmptyValue optNoHiddenEmptyValue optAllowZeroFilesize
+ optKeepSrcInMemory optKeepSpaces optOpenLogEarly optNoUncloseWarn
+ _ep_node
+ } ;
+ @AliasHash = qw{fdat udat mdat idat http_headers_out fsplitdat} ;
+ @AliasArray = qw{ffld} ;
+ } ;
+
+use vars (map { "\$$_" } @AliasScalar) ;
+use vars (map { "\%$_" } @AliasHash) ;
+use vars (map { "\@$_" } @AliasArray) ;
+
+
+no strict ;
+foreach (@HTML::Embperl::AliasScalar)
+ {
+ $dummy = ${"HTML::Embperl\:\:$_"} ; # necessary to make sure variable exists!
+ $dummy = ${"HTML::Embperl\:\:$_"} ; # necessary to make sure variable exists!
+ }
+use strict ;
#######################################################################################
#
@@ -666,7 +674,7 @@
my %cgienv = $req_rec->cgi_env ;
while (($k, $v) = each %cgienv)
{
- $ENV{$k} ||= $v ;
+ $ENV{$k} = $v if (!exists $ENV{$k}) ;
}
}
@@ -1712,11 +1720,6 @@
#######################################################################################
use strict ;
-use vars qw {
- @AliasScalar
- @AliasHash
- @AliasArray
- } ;
if (defined ($ENV{MOD_PERL}))
{
@@ -1904,23 +1907,6 @@
#######################################################################################
-@AliasScalar = qw{row col cnt maxrow maxcol tabmode escmode req_rec _ep_node
- dbgAll dbgAllCmds dbgCmd dbgDefEval dbgEarlyHttpHeader
- dbgEnv dbgEval dbgFlushLog dbgFlushOutput dbgForm
- dbgFunc dbgHeadersIn dbgImport dbgInput dbgLogLink
- dbgMem dbgProfile dbgShowCleanup dbgSource dbgStd
- dbgSession dbgTab dbgWatchScalar dbgParse dbgObjectSearch
- optDisableChdir optDisableEmbperlErrorPage optReturnError optDisableFormData
- optDisableHtmlScan optDisableInputScan optDisableMetaScan optDisableTableScan
- optDisableSelectScan optDisableVarCleanup optEarlyHttpHeader optOpcodeMask
- optRawInput optSafeNamespace optSendHttpHeader optAllFormData
- optRedirectStdout optUndefToEmptyValue optNoHiddenEmptyValue optAllowZeroFilesize
- optKeepSrcInMemory optKeepSpaces optOpenLogEarly optNoUncloseWarn
- } ;
-@AliasHash = qw{fdat udat mdat idat http_headers_out fsplitfdat} ;
-@AliasArray = qw{ffld} ;
-
-#######################################################################################
sub CreateAliases
@@ -1936,19 +1922,17 @@
if (!defined(${"$package\:\:row"}))
{ # create new aliases for Embperl magic vars
- foreach (@AliasScalar)
+ foreach (@HTML::Embperl::AliasScalar)
{
*{"$package\:\:$_"} = \${"HTML::Embperl\:\:$_"} ;
$dummy = ${"$package\:\:$_"} ; # necessary to make sure variable exists!
- $dummy = ${"HTML::Embperl\:\:$_"} ; # necessary to make sure variable exists!
- $dummy = ${"HTML::Embperl\:\:$_"} ; # necessary to make sure variable exists!
}
- foreach (@AliasHash)
+ foreach (@HTML::Embperl::AliasHash)
{
*{"$package\:\:$_"} = \%{"HTML::Embperl\:\:$_"} ;
}
- foreach (@AliasArray)
+ foreach (@HTML::Embperl::AliasArray)
{
*{"$package\:\:$_"} = \@{"HTML::Embperl\:\:$_"} ;
}
1.6.4.5 +2 -1 embperl/epmacro.h
Index: epmacro.h
===================================================================
RCS file: /home/cvs/embperl/epmacro.h,v
retrieving revision 1.6.4.4
retrieving revision 1.6.4.5
diff -u -r1.6.4.4 -r1.6.4.5
--- epmacro.h 2001/05/11 07:13:50 1.6.4.4
+++ epmacro.h 2001/06/05 11:58:10 1.6.4.5
@@ -30,7 +30,8 @@
{ \
\
sv_setiv (pSV, var) ; \
- used++ ; \
+ if (pCurrReq -> bReqRunning) \
+ used++ ; \
if ((pCurrReq -> bDebug & dbgTab) && pCurrReq -> bReqRunning) \
lprintf (pCurrReq, "[%d]TAB: get %s = %d, Used = %d\n", pCurrReq -> nPid, #name, var, used) ; \
return 0 ; \
1.75.4.36 +9 -4 embperl/epmain.c
Index: epmain.c
===================================================================
RCS file: /home/cvs/embperl/epmain.c,v
retrieving revision 1.75.4.35
retrieving revision 1.75.4.36
diff -u -r1.75.4.35 -r1.75.4.36
--- epmain.c 2001/05/15 14:20:00 1.75.4.35
+++ epmain.c 2001/06/05 11:58:11 1.75.4.36
@@ -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.35 2001/05/15 14:20:00 richter Exp $
+# $Id: epmain.c,v 1.75.4.36 2001/06/05 11:58:11 richter Exp $
#
###################################################################################*/
@@ -116,6 +116,7 @@
case rcEndtableWithoutTablerow: msg ="[%d]ERR: %d: Line %d: </tr> without <tr>%s%s" ; break ;
case rcEndtextareaWithoutTextarea: msg ="[%d]ERR: %d: Line %d: </textarea> without <textarea>%s%s" ; break ;
case rcEvalErr: msg ="[%d]ERR: %d: Line %d: Error in Perl code: %s%s" ; break ;
+ case rcNotCompiledForModPerl: msg ="[%d]ERR: %d: Line %d: Embperl is not compiled for mod_perl. Rerun Makefile.PL and give the correct Apache source tree location %s%s" ; break ;
case rcExecCGIMissing: msg ="[%d]ERR: %d: Line %d: Forbidden %s: Options ExecCGI not set in your Apache configs%s" ; break ;
case rcIsDir: msg ="[%d]ERR: %d: Line %d: Forbidden %s is a directory%s" ; break ;
case rcXNotSet: msg ="[%d]ERR: %d: Line %d: Forbidden %s X Bit not set%s" ; break ;
@@ -2188,8 +2189,10 @@
ppSV = hv_fetch(r -> pEnvHash, "PATH_INFO", sizeof ("PATH_INFO") - 1, 0) ;
if (ppSV)
r -> sPathInfo = SvPV (*ppSV ,len) ;
-#endif
r -> pTokenTable = pTokenTable ;
+#else
+ r -> pTokenTable = (void *)pTokenTable ;
+#endif
if (rc != ok)
r -> bDebug = 0 ; /* Turn debbuging off, only errors will go to stderr if logfile not open */
r -> bOptions = pConf -> bOptions ;
@@ -2229,7 +2232,7 @@
r -> bAppendToMainReq = FALSE ;
}
- r -> bReqRunning = 1 ;
+ r -> bReqRunning = 0 ;
r -> Buf.pFile = pFile ;
@@ -2858,7 +2861,7 @@
oputs (r, "Content-Type: ") ;
oputs (r, pContentType) ;
oputs (r, "\n") ;
- sprintf (txt, "Content-Length: %d\n", GetContentLength (r) + 2) ;
+ sprintf (txt, "Content-Length: %d\n", GetContentLength (r) + (r -> pCurrEscape?2:0)) ;
oputs (r, txt) ;
if (pCookie)
{
@@ -3490,6 +3493,8 @@
}
else
r -> bOptions |= optDisableChdir ;
+
+ r -> bReqRunning = 1 ;
if ((rc = ProcessFile (r, r -> Buf.pFile -> nFilesize)) != ok)
if (rc == rcExit)
1.70.4.62 +2 -1 embperl/test.pl
Index: test.pl
===================================================================
RCS file: /home/cvs/embperl/test.pl,v
retrieving revision 1.70.4.61
retrieving revision 1.70.4.62
diff -u -r1.70.4.61 -r1.70.4.62
--- test.pl 2001/05/22 11:25:04 1.70.4.61
+++ test.pl 2001/06/05 11:58:12 1.70.4.62
@@ -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.61 2001/05/22 11:25:04 richter Exp $
+# $Id: test.pl,v 1.70.4.62 2001/06/05 11:58:12 richter Exp $
#
###################################################################################
@@ -528,6 +528,7 @@
},
'EmbperlObject/sub/eponotfound.htm' => {
'offline' => 0,
+ 'cgi' => 0,
},
'EmbperlObject/sub/epobless.htm' => {
'offline' => 0,
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-cvs-help@perl.apache.org