richter 01/09/18 11:01:46
Modified: . Tag: Embperl2c Changes.pod INSTALL.pod MANIFEST
Makefile.PL epparse.c test.pl
Embperl Tag: Embperl2c Syntax.pm
Embperl/Syntax Tag: Embperl2c POD.pm
Added: . Tag: Embperl2c Embperl_BS
Log:
different libraries for Apache and non Apache mode
Revision Changes Path
No revision
No revision
1.129.4.29 +14 -3 embperl/Changes.pod
Index: Changes.pod
===================================================================
RCS file: /home/cvs/embperl/Changes.pod,v
retrieving revision 1.129.4.28
retrieving revision 1.129.4.29
diff -u -r1.129.4.28 -r1.129.4.29
--- Changes.pod 2001/09/13 07:29:42 1.129.4.28
+++ Changes.pod 2001/09/18 18:01:45 1.129.4.29
@@ -1,5 +1,19 @@
=pod
+=head1 2.0b4 (BETA)
+
+ - Enhancements for RTF syntax, allowing no IF fields and passes
+ thru any unkown fields.
+ - Fixed problem when loading syntax. Spotted by Michael Stevens.
+ - Allow Perl code inside of HTML attributes in ASP syntax, together with
+ EmbperlHTML syntax. SPotted by Ivan G. Shevchenko.
+ - Added POD syntax, which converts POD to XML, which can transformed to
+ any other output format using XSLT.
+ - Embperl can now be installed as Apache and non Apache version on the
+ same system. This is neccessary to work on Windows in- and outside of
+ Apache.
+
+
=head1 2.0b3 (BETA) 9. July 2001
- correct package handling in EP1COMPAT mode
@@ -32,9 +46,6 @@
- Added RTF syntax. This allows you for example to create serial letters
with your favorite word processing program, save them as RTF and process
them with Embperl. See HTML::Embperl::Syntax::RTF for docs.
- - Fixed problem when loading syntax. Spotted by Michael Stevens.
- - Allow Perl code inside of HTML attributes in ASP syntax, together with
- EmbperlHTML syntax. SPotted by Ivan G. Shevchenko.
=head1 2.0b2 (BETA) 29. Mar 2001
1.12.4.6 +19 -6 embperl/INSTALL.pod
Index: INSTALL.pod
===================================================================
RCS file: /home/cvs/embperl/INSTALL.pod,v
retrieving revision 1.12.4.5
retrieving revision 1.12.4.6
diff -u -r1.12.4.5 -r1.12.4.6
--- INSTALL.pod 2001/05/15 14:19:29 1.12.4.5
+++ INSTALL.pod 2001/09/18 18:01:45 1.12.4.6
@@ -21,9 +21,8 @@
- B<make install>
-B<NOTE 1:> (only Embperl-1.2b1 or higher) For using session handling you need
-Apache::Session-1.00 or higher. If possible use Apache::Session 1.52 or higher.
-Starting with Embperl 1.3b7 Apache::Session 0.17 is B<NOT> supported anymore.
+B<NOTE 1:> For using session handling you need
+Apache::Session 1.53 and Apache::SessionX 2.00b3 or higher.
B<NOTE 2:> I<Embperl> runs without additional Perl modules, but the C<make test>
needs the following modules to work:
@@ -161,9 +160,8 @@
B<nmake install>
-B<NOTE 1:> (only Embperl-1.2b1 or higher) For using session handling you need
-Apache::Session-1.00 or higher. If possible use Apache::Session 1.52 or higher.
-Starting with Embperl 1.3b7 Apache::Session 0.17 is B<NOT> supported anymore.
+B<NOTE 1:> For using session handling you need
+Apache::Session 1.53 and Apache::SessionX 2.00b3 or higher.
B<NOTE 2:> I<Embperl> runs without additional Perl modules, but the C<make test>
needs the following modules to work:
@@ -244,6 +242,21 @@
nmake test
nmake install
+
+
+=head2 WIN 32: Install Apache and non Apache version on the same system
+
+Unlike Unix, Windows loads any needed DLL (dynamic libraries) at startup. This
+causes trouble when Embperl is compiled for use with Apache and mod_perl, but
+is used outside of Apache, because Windows tries to load F<ApacheCore.dll>.
+To solve this problem Embperl 1.3.4+ can install a Apache and a non Apache
+version. To do this first install the Apache version as decribed above
+(includeing the C<nmake install>) .
+Afterwards rerun Makefile.PL, when ask for mod_perl support answer no, now
+Makefile.PL detects that a mod_perl version was already compiled and asks
+if you what a separte non Apache version. Just say yes here and compile
+and install this version too. When Embperl is loaded it detects if runs in-
+or outside of Apache and loads the correct library.
=head2 How to continue
1.50.4.29 +1 -0 embperl/MANIFEST
Index: MANIFEST
===================================================================
RCS file: /home/cvs/embperl/MANIFEST,v
retrieving revision 1.50.4.28
retrieving revision 1.50.4.29
diff -u -r1.50.4.28 -r1.50.4.29
--- MANIFEST 2001/09/13 07:29:43 1.50.4.28
+++ MANIFEST 2001/09/18 18:01:45 1.50.4.29
@@ -399,4 +399,5 @@
Embperl/Session.pm
Embperl/Mail.pm
EmbperlLogo.gif
+Embperl_BS
1.31.4.21 +29 -0 embperl/Makefile.PL
Index: Makefile.PL
===================================================================
RCS file: /home/cvs/embperl/Makefile.PL,v
retrieving revision 1.31.4.20
retrieving revision 1.31.4.21
diff -u -r1.31.4.20 -r1.31.4.21
--- Makefile.PL 2001/09/17 14:32:00 1.31.4.20
+++ Makefile.PL 2001/09/18 18:01:45 1.31.4.21
@@ -229,6 +229,20 @@
$self -> MM::post_initialize (@_) ;
}
+
+ sub MY::post_constants
+ {
+ my $self = shift ;
+
+
+ my $txt = $self -> MM::post_constants (@_) ;
+
+ $txt .= "\n# Change name of dynamic lib, in case we need two of them (with
and w/o Apache support)\nINST_DYNAMIC =
\$(INST_ARCHAUTODIR)\\\$(DLBASE).NoApache.\$(DLEXT)\n" if ($EPNOAPACHELIB) ;
+
+ return $txt ;
+
+ }
+
## ----------------------------------------------------------------------------
sub GetString
@@ -593,6 +607,13 @@
else
{
$apache = 0 ;
+ if ($win32 && ($EPAPACHESRC || $EPNOAPACHELIB))
+ {
+ print "\nYou have already build Embperl with support for Apache mod_perl\n"
;
+ $EPNOAPACHELIB = GetYesNo ("Do you want a build a separate dynamic library
so both can be used?", 'y') ;
+ }
+
+
print "Will build without mod_perl support\n" ;
$i = '' ;
$d = '' ;
@@ -927,6 +948,7 @@
print FH "\$EP2='$EP2';\n" ;
print FH "\$EPMODPERLVERSION='$MPVer';\n" ;
print FH "\$EPC_ENABLE='$epc_enable';\n" ;
+ print FH "\$EPNOAPACHELIB='$EPNOAPACHELIB';\n" ;
if ($win32)
{
print FH "\$EPNULL='nul';\n" ;
@@ -968,6 +990,13 @@
print FH "\$EPSESSIONXVERSION='$SessXVer';\n" ;
print FH "\$EPSSLDISABLE='$EPSSLDISABLE' ;\n" ;
print FH "\$EP2='$EP2';\n" ;
+ print FH "\$EPNOAPACHELIB='$EPNOAPACHELIB';\n" ;
+ print FH "\$EPC_ENABLE='$epc_enable';\n" ;
+ print FH "\$EPHTTPD='" . cnvpath($EPHTTPD) . "' ;\n" ;
+ print FH "\$EPHTTPDDLL='" . cnvpath($EPHTTPDDLL) . "' ;\n" ;
+ print FH "\$EPWIN32='$win32' ;\n" ;
+ print FH "\$EPAPACHESRC='" . cnvpath($EPAPACHESRC) . "' ;\n" ;
+ print FH "\$EPMODPERL='" . cnvpath2unix($loadmodules) . "';\n" ;
close FH ;
}
1.4.2.34 +43 -11 embperl/Attic/epparse.c
Index: epparse.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epparse.c,v
retrieving revision 1.4.2.33
retrieving revision 1.4.2.34
diff -u -r1.4.2.33 -r1.4.2.34
--- epparse.c 2001/09/14 11:06:26 1.4.2.33
+++ epparse.c 2001/09/18 18:01:45 1.4.2.34
@@ -9,7 +9,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epparse.c,v 1.4.2.33 2001/09/14 11:06:26 richter Exp $
+# $Id: epparse.c,v 1.4.2.34 2001/09/18 18:01:45 richter Exp $
#
###################################################################################*/
@@ -554,6 +554,7 @@
enum tNodeType nForceType,
int bUnescape,
int bInsideMustExist,
+ int bRemoveSpaces,
tStringIndex nParentNodeName,
tNode xParentNode,
int level,
@@ -725,14 +726,23 @@
tNode xNewAttrNode ;
if (pEndCurr - pCurr && pToken -> nCDataType && pToken ->
nCDataType != ntypCDATA)
{ /* add text before end of token as node */
+ char * pEnd = pEndCurr ;
+
+ if (pToken -> bRemoveSpaces & 32)
+ while (pEnd >= pCurrStart && isspace (*pEnd))
+ pEnd-- ;
+ else if (pToken -> bRemoveSpaces & 64)
+ while (pEnd >= pCurrStart && (*pEnd == ' ' || *pEnd ==
'\t' || *pEnd == '\r'))
+ pEnd-- ;
+
if (pToken -> bUnescape)
{
r -> bEscInUrl = pToken -> bUnescape - 1 ;
- TransHtml (r, pCurr, pEndCurr - pCurr) ;
+ TransHtml (r, pCurr, pEnd - pCurr) ;
r -> bEscInUrl = 0 ;
}
- if (!(xNewAttrNode = Node_appendChild (pDomTree, pToken ->
nCDataType, 0, pCurr, pEndCurr - pCurr, xParentNode, level+1, GetLineNoOf (r, pCurr),
NULL)))
+ if (!(xNewAttrNode = Node_appendChild (pDomTree, pToken ->
nCDataType, 0, pCurr, pEnd - pCurr, xParentNode, level+1, GetLineNoOf (r, pCurr),
NULL)))
return 1 ;
if (pToken -> bAddFlags)
Node_self (pDomTree, xNewAttrNode) -> bFlags |=
pToken -> bAddFlags ;
@@ -790,6 +800,7 @@
0,
pToken -> bUnescape,
pToken -> bInsideMustExist +
bInsideMustExist,
+ pToken -> bRemoveSpaces,
nNodeName,
xNewNode,
level+1,
@@ -866,19 +877,29 @@
if (pEndCurr - pCurr && pToken -> nCDataType)
{
int nLine ;
- if (pToken -> bUnescape)
+ char * pEnd = pEndCurr ;
+
+ if (pToken -> bRemoveSpaces & 32)
+ while (pEnd >= pCurrStart && isspace (*pEnd))
+ pEnd-- ;
+ else if (pToken -> bRemoveSpaces & 64)
+ while (pEnd >= pCurrStart && (*pEnd == ' ' ||
*pEnd == '\t' || *pEnd == '\r'))
+ pEnd-- ;
+
+ if (pToken -> bUnescape)
{
r -> bEscInUrl = pToken -> bUnescape - 1 ;
- TransHtml (r, pCurr, pEndCurr - pCurr) ;
+ TransHtml (r, pCurr, pEnd - pCurr) ;
r -> bEscInUrl = 0 ;
}
- if (!(xNewAttrNode = Node_appendChild (pDomTree,
pToken -> nCDataType, 0, pCurr, pEndCurr - pCurr, xNewNode, level+1, nLine =
GetLineNoOf (r, pCurr), pToken -> sText)))
+
+ if (!(xNewAttrNode = Node_appendChild (pDomTree,
pToken -> nCDataType, 0, pCurr, pEnd - pCurr, xNewNode, level+1, nLine = GetLineNoOf
(r, pCurr), pToken -> sText)))
return 1 ;
if (pToken -> bAddFlags)
Node_self (pDomTree, xNewAttrNode) -> bFlags |=
pToken -> bAddFlags ;
if (pToken -> sParseTimePerlCode)
- if ((rc = ExecParseTimeCode (r, pToken, pCurr,
pEndCurr - pCurr, nLine)) != ok)
+ if ((rc = ExecParseTimeCode (r, pToken, pCurr,
pEnd - pCurr, nLine)) != ok)
return rc ;
}
@@ -919,12 +940,23 @@
else if (sEndText == NULL ||
(*pCurr == *sEndText && strncmp (pCurr, sEndText, nEndText) == 0))
{
+ char * pEnd ;
if (pCDATAStart)
pCurr += nEndText ;
- if ((pCurr - pCurrStart != 0 || nCDataType == ntypAttrValue) && nCDataType)
- if (!(xNewNode = Node_appendChild (pDomTree, nCDataType, 0,
pCurrStart, pCurr - pCurrStart, xParentNode, level, GetLineNoOf (r, pCurr), NULL)))
+ pEnd = pCurr - 1 ;
+
+ if (bRemoveSpaces & 32)
+ while (pEnd >= pCurrStart && isspace (*pEnd))
+ pEnd-- ;
+ else if (bRemoveSpaces & 64)
+ while (pEnd >= pCurrStart && (*pEnd == ' ' || *pEnd == '\t' || *pEnd
== '\r'))
+ pEnd-- ;
+
+ if ((pEnd - pCurrStart + 1 != 0 || nCDataType == ntypAttrValue) &&
nCDataType)
+ if (!(xNewNode = Node_appendChild (pDomTree, nCDataType, 0,
pCurrStart, pEnd - pCurrStart + 1, xParentNode, level, GetLineNoOf (r, pCurr), NULL)))
return 1 ;
- if (!pCDATAStart && !sStopText)
+
+ if (!pCDATAStart && !sStopText)
pCurr += nEndText ;
*ppCurr = pCurr ;
return bInsideMustExist?rcNotFound:ok ;
@@ -988,7 +1020,7 @@
pTokenTableSave = r -> pTokenTable ;
- if ((rc = ParseTokens (r, &pStart, pEnd, r -> pTokenTable, "", NULL, r ->
pTokenTable -> nDefNodeType, 0, 0, 0, String2Ndx("root", 4), xDocNode, 0, NULL, NULL))
!= ok)
+ if ((rc = ParseTokens (r, &pStart, pEnd, r -> pTokenTable, "", NULL, r ->
pTokenTable -> nDefNodeType, 0, 0, 0, 0, String2Ndx("root", 4), xDocNode, 0, NULL,
NULL)) != ok)
return rc ;
/* Add one child node end the end to catch loops that end at the very last node
*/
1.70.4.72 +13 -10 embperl/test.pl
Index: test.pl
===================================================================
RCS file: /home/cvs/embperl/test.pl,v
retrieving revision 1.70.4.71
retrieving revision 1.70.4.72
diff -u -r1.70.4.71 -r1.70.4.72
--- test.pl 2001/09/17 14:32:00 1.70.4.71
+++ test.pl 2001/09/18 18:01:45 1.70.4.72
@@ -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.71 2001/09/17 14:32:00 richter Exp $
+# $Id: test.pl,v 1.70.4.72 2001/09/18 18:01:45 richter Exp $
#
###################################################################################
@@ -346,6 +346,7 @@
'query_info' => 'a=1&b=2',
'option' => '384',
'cgi' => 0,
+ 'condition' => '!$EPWIN32',
},
'match/div.htm' => {
'offline' => 0,
@@ -713,9 +714,9 @@
# avoid some warnings:
-use vars qw ($httpconfsrc $httpconf $EPPORT $EPPORT2 *SAVEERR *ERR $EPHTTPDDLL
$EPSTARTUP $EPDEBUG
+use vars qw ($httpconfsrc $httpconf $EPPORT $EPPORT2 *SAVEERR *ERR $EPHTTPDDLL
$EPSTARTUP $EPDEBUG $EPMODPERLVERSION
$testshare
- $EPSESSIONDS $EPSESSIONCLASS $EPSESSIONVERSION $EP1COMPAT
$EPAPACHEVERSION $EPC_ENABLE
+ $EPSESSIONDS $EPSESSIONCLASS $EPSESSIONVERSION $EP1COMPAT
$EPAPACHEVERSION $EPC_ENABLE $EPSESSIONXVERSION
$opt_offline $opt_ep1 $opt_cgi $opt_modperl $opt_execute $opt_nokill
$opt_loop
$opt_multchild $opt_memcheck $opt_exitonmem $opt_exitonsv $opt_config
$opt_nostart $opt_uniquefn
$opt_quite $opt_qq $opt_ignoreerror $opt_tests $opt_blib $opt_help
$opt_dbgbreak $opt_finderr
@@ -764,7 +765,7 @@
}
else
{
- system "kill `cat $tmppath/httpd.pid` 2> /dev/null" if ($EPHTTPD ne '') ;
+ system "kill `cat $tmppath/httpd.pid` 2> /dev/null" if ($EPMODPERLVERSION)
;
}
} ;
@@ -784,6 +785,7 @@
$ENV{EMBPERL_LOG} = $logfile ;
$ENV{EMBPERL_DEBUG} = $defaultdebug ;
+ $ENV{EMBPERL_SESSION_HANDLER_CLASS} = 'no' ; # no session handling in offline
mode
unlink ($logfile) ;
}
@@ -791,7 +793,7 @@
END
{
print "\nTest terminated with fatal error\n" if ($fatal) ;
- system "kill `cat $tmppath/httpd.pid` 2> /dev/null" if ($EPHTTPD ne '' &&
!$opt_nokill && !$EPWIN32) ;
+ system "kill `cat $tmppath/httpd.pid` 2> /dev/null" if ($EPMODPERLVERSION &&
!$opt_nokill && !$EPWIN32) ;
$? = $fatal || $err ;
}
@@ -825,7 +827,7 @@
$EPSESSIONCLASS = $ENV{EMBPERL_SESSION_CLASS} || (($EPSESSIONVERSION =~
/^0\.17/)?'Win32':'0') || ($EPSESSIONVERSION >= 1.00?'Embperl':'0') ;
$EPSESSIONDS = $ENV{EMBPERL_SESSION_DS} || 'dbi:mysql:session' ;
-die "You must install libwin32 first" if ($EPWIN32 && $win32loaderr && $EPHTTPD) ;
+die "You must install libwin32 first" if ($EPWIN32 && $win32loaderr &&
$EPMODPERLVERSION) ;
#### setup files ####
@@ -1369,7 +1371,7 @@
{
$opt_modperl = 1 ;
}
- elsif ($EPHTTPD ne '')
+ elsif ($EPMODPERLVERSION)
{ $opt_cache = $opt_modperl = $opt_cgi = $opt_offline = $opt_execute = 1 }
else
{ $opt_cache = $opt_offline = $opt_execute = 1 }
@@ -2157,7 +2159,7 @@
$httpduid = getpwnam ($EPUSER) if (!$EPWIN32) ;
}
- elsif ($err == 0 && $EPHTTPD eq '')
+ elsif ($err == 0 && !$EPMODPERLVERSION)
{
print "\n\nSkiping tests for mod_perl, because Embperl is not build for it.\n"
;
print "Embperl can still be used as CGI-script, but 'make test' cannot test
it\n" ;
@@ -2337,7 +2339,8 @@
if ($opt_cgi && $err == 0 && $loc ne $cgiloc && $loopcnt == 0)
{
- $loc = $EP2?'':$cgiloc ; # currently disable cgi mode at all for Embperl
2.x
+ #$loc = $EP2?'':$cgiloc ; # currently disable cgi mode at all for Embperl
2.x
+ $loc = $cgiloc ;
}
else
{
@@ -2395,7 +2398,7 @@
}
else
{
- system "kill `cat $tmppath/httpd.pid` 2> /dev/null" if ($EPHTTPD ne '' &&
!$opt_nokill) ;
+ system "kill `cat $tmppath/httpd.pid` 2> /dev/null" if ($EPMODPERLVERSION &&
!$opt_nokill) ;
}
exit ($err) ;
No revision
No revision
1.1.2.1 +13 -0 embperl/Attic/Embperl_BS
No revision
No revision
1.1.4.44 +19 -1 embperl/Embperl/Attic/Syntax.pm
Index: Syntax.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Attic/Syntax.pm,v
retrieving revision 1.1.4.43
retrieving revision 1.1.4.44
diff -u -r1.1.4.43 -r1.1.4.44
--- Syntax.pm 2001/09/10 10:06:09 1.1.4.43
+++ Syntax.pm 2001/09/18 18:01:46 1.1.4.44
@@ -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.43 2001/09/10 10:06:09 richter Exp $
+# $Id: Syntax.pm,v 1.1.4.44 2001/09/18 18:01:46 richter Exp $
#
###################################################################################
@@ -539,6 +539,12 @@
Do an linear serach instead of a binary search. This is necessary if the
tokens can't clearly separated.
+=item '-defnodetype' => ntypText,
+
+Defines the default type for text nodes. Without any specification the type
+is CDATA, which mean no escaping takes places. With C<ntypText> all special
+characters are escaped.
+
=item <name> => \%tokendescription
All items which does not start with a slash are treated as names. The name
@@ -789,6 +795,18 @@
=item 8
Remove spaces and tabs after tag
+
+=item 16
+
+Remove all spaces and tabs but one before tag
+
+=item 32
+
+Remove all whihe space after text inside of tag
+
+=item 64
+
+Remove spaces and tabs after text inside of tag
=back
No revision
No revision
1.1.2.3 +9 -4 embperl/Embperl/Syntax/Attic/POD.pm
Index: POD.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Syntax/Attic/POD.pm,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- POD.pm 2001/09/14 11:06:26 1.1.2.2
+++ POD.pm 2001/09/18 18:01:46 1.1.2.3
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: POD.pm,v 1.1.2.2 2001/09/14 11:06:26 richter Exp $
+# $Id: POD.pm,v 1.1.2.3 2001/09/18 18:01:46 richter Exp $
#
###################################################################################
@@ -82,7 +82,7 @@
'text' => $cmdname,
'nodetype' => ntypStartEndTag,
'cdatatype' => ntypText,
- 'removespaces' => 8,
+ 'removespaces' => 72,
'inside' => \%Format,
} ;
$tag -> {nodename} = $name if ($name) ;
@@ -102,7 +102,7 @@
'text' => $start,
'nodetype' => ntypStartTag,
'cdatatype' => 0,
- 'removespaces' => 8,
+ 'removespaces' => 72,
} ;
$stag -> {nodename} = $name if ($name) ;
@@ -111,7 +111,7 @@
'nodetype' => ntypEndTag,
'cdatatype' => 0,
'starttag' => $start,
- 'removespaces' => 8,
+ 'removespaces' => 72,
} ;
return $stag ;
}
@@ -222,6 +222,11 @@
},
'POD Emptyline' => {
'text' => "\n\n",
+ 'nodename' => 'BR/',
+ 'nodetype' => ntypTag,
+ },
+ 'POD Emptyline' => {
+ 'text' => "\r\n\r\n",
'nodename' => 'BR/',
'nodetype' => ntypTag,
},
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]