richter 2003/02/26 23:05:33
Modified: . Changes.pod MANIFEST Makefile.PL eputil.c test.pl
Embperl/Syntax EmbperlHTML.pm
driver epxalan.MAKEPL
eg/web/db epwebapp.pl
test/conf httpd.conf.src startup.pl
Added: test/cmp subreq.htm
test/html subreq.htm
Log:
Apache2:: + subreq test
Revision Changes Path
1.203 +4 -0 embperl/Changes.pod
Index: Changes.pod
===================================================================
RCS file: /home/cvs/embperl/Changes.pod,v
retrieving revision 1.202
retrieving revision 1.203
diff -u -r1.202 -r1.203
--- Changes.pod 24 Feb 2003 07:23:00 -0000 1.202
+++ Changes.pod 27 Feb 2003 07:05:31 -0000 1.203
@@ -65,6 +65,10 @@
for application object.
- Added -type => Integer, IPAddr, IPAddr_Net, TimeHHMM, TimeHHMMSS,
EMail and EMailRFC to Embperl::Form::Validate.
+ - Fixed problem with [$var$] and select reported by Joshua Spoerri.
+ - Embperl compiles and tests now correctly if mod_perl installed
+ under Apache2 namespace.
+ - Added tests for epform and subreq.
=head1 2.0b8 (BETA) 25. Juni 2002
1.79 +2 -0 embperl/MANIFEST
Index: MANIFEST
===================================================================
RCS file: /home/cvs/embperl/MANIFEST,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- MANIFEST 15 Feb 2003 20:46:31 -0000 1.78
+++ MANIFEST 27 Feb 2003 07:05:31 -0000 1.79
@@ -327,6 +327,7 @@
test/cmp/ssiep.htm
test/cmp/stdout.htm
test/cmp/sub.htm
+test/cmp/subreq.htm
test/cmp/subtab.htm
test/cmp/subtextarea.htm
test/cmp/syntax.htm
@@ -535,6 +536,7 @@
test/html/subexec.htm
test/html/subimp.htm
test/html/subimp.pm
+test/html/subreq.htm
test/html/subtab.htm
test/html/subtextarea.htm
test/html/syntax.htm
1.61 +17 -1 embperl/Makefile.PL
Index: Makefile.PL
===================================================================
RCS file: /home/cvs/embperl/Makefile.PL,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- Makefile.PL 14 Feb 2003 21:04:08 -0000 1.60
+++ Makefile.PL 27 Feb 2003 07:05:32 -0000 1.61
@@ -540,6 +540,22 @@
}
}
}
+else
+ {
+ my @vers = start ("\"$apache_src/bin/httpd\" -v") ;
+
+ if ($vers[0] =~ m#/2#)
+ {
+ # check for mod_perl 2.0
+ eval 'use Apache2; use Apache::BuildConfig' ;
+
+ if ($@ eq '')
+ {
+ $mp2cfg = Apache::BuildConfig -> new ;
+ print "Found mod_perl 2.0\n" ;
+ }
+ }
+ }
eval 'do "test/conf/config.pl"' ;
1.32 +2 -1 embperl/eputil.c
Index: eputil.c
===================================================================
RCS file: /home/cvs/embperl/eputil.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- eputil.c 15 Feb 2003 20:46:32 -0000 1.31
+++ eputil.c 27 Feb 2003 07:05:32 -0000 1.32
@@ -1998,6 +1998,7 @@
time_t when;
struct tm *tms;
int sep = bHTTP ? ' ' : '-';
+ dTHX ;
if (!sTime) {
return NULL;
1.126 +5 -1 embperl/test.pl
Index: test.pl
===================================================================
RCS file: /home/cvs/embperl/test.pl,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -r1.125 -r1.126
--- test.pl 24 Feb 2003 07:23:00 -0000 1.125
+++ test.pl 27 Feb 2003 07:05:32 -0000 1.126
@@ -982,6 +982,10 @@
'version' => 2,
'query_info' => 'datum=23.12.2002&stunden=x',
},
+ 'subreq.htm' => {
+ 'version' => 2,
+ 'condition' => '$MP2',
+ },
) ;
for ($i = 0 ; $i < @testdata; $i += 2)
1.3 +3 -1 embperl/Embperl/Syntax/EmbperlHTML.pm
Index: EmbperlHTML.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Syntax/EmbperlHTML.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- EmbperlHTML.pm 22 Oct 2002 05:39:49 -0000 1.2
+++ EmbperlHTML.pm 27 Feb 2003 07:05:33 -0000 1.3
@@ -64,6 +64,8 @@
{
my ($self) = @_ ;
+ $self -> AddInitCode ('use vars qw{$_ep_selectname};') ;
+
$self -> AddTag ('input', ['type', 'name', 'value'], ['src'], ['checked'],
{
perlcode =>
1.3 +3 -1 embperl/driver/epxalan.MAKEPL
Index: epxalan.MAKEPL
===================================================================
RCS file: /home/cvs/embperl/driver/epxalan.MAKEPL,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- epxalan.MAKEPL 22 Oct 2002 05:45:12 -0000 1.2
+++ epxalan.MAKEPL 27 Feb 2003 07:05:33 -0000 1.3
@@ -94,8 +94,10 @@
- my ($l1, $l2) = "$xalanlib $xerceslib" =~ /^lib(.*?)\.so lib(.*?)\.so$/ ;
+ my ($l1, $l2) = "$xalanlib $xerceslib" =~ /^lib(.*?)\.so(?:\.\d+)?
lib(.*?)\.so(?:\.\d+)?$/ ;
($l1, $l2) = "$xalanlib $xerceslib" =~ /^(xalan.*?\.lib) (xerces.*?\.lib)$/i if
($win32) ;
+
+ print "Somethings is wrong with library names ($l1, $l2)\n" if (!$l1 || !$l2) ;
return { cflags => "-I\"$pathsrc\" -I\"$xercesinc\" -D_REENTRANT " ,
cpp => $cpp,
1.12 +7 -2 embperl/eg/web/db/epwebapp.pl
Index: epwebapp.pl
===================================================================
RCS file: /home/cvs/embperl/eg/web/db/epwebapp.pl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- epwebapp.pl 20 Feb 2003 21:22:50 -0000 1.11
+++ epwebapp.pl 27 Feb 2003 07:05:33 -0000 1.12
@@ -122,6 +122,8 @@
sub current_time
{
+ return $_[0] if ($_[0]) ;
+
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time);
@@ -151,9 +153,10 @@
my $buri = $r->{config}{baseuri} ;
my $uri = $r-> param -> uri ;
my $path = ($uri =~ /$buri(.*?)$/)?$1:$uri ;
+ my $lang = (@{$config -> {supported_languages}} > 1)?$r -> param -> language .
'/':'' ;
- return $r -> {action_prefix} . $buri . $r -> param -> language . '/' . $path if
(!$dest) ;
- return $r -> {action_prefix} . $buri . $r -> param -> language .
dirname("/$path") .'/' . $dest ;
+ return $r -> {action_prefix} . $buri . $lang . $path if (!$dest) ;
+ return $r -> {action_prefix} . $buri . $lang . dirname("/$path") .'/' . $dest ;
}
@@ -426,6 +429,7 @@
'!Table' => $tt,
'!Serial' => 'id',
url => $fdat{url},
+ $fdat{modtime} ? (modtime =>
$fdat{modtime}) : (),
category_id => $fdat{category_id},
user_id => $r -> {user_id},
state => $r ->{user_admin} ?
($fdat{state}?1:0):0}) ;
@@ -522,6 +526,7 @@
# update the entry, but only if it has the correct user id or the has admin
rights
my $rows = $$set -> Update ({ url => $fdat{url},
+ $fdat{modtime} ? (modtime => $fdat{modtime}) : (),
$fdat{category_id} ? (category_id =>
$fdat{category_id}) : (),
$r->{user_admin} ? (state => $fdat{state})
: () },
{ id => $fdat{"${tt}_id"},
1.1 embperl/test/cmp/subreq.htm
Index: subreq.htm
===================================================================
<html>
<head>
<title>Embperl Tests - Apache 2 subrequest</title>
</head>
<body>
<html>
<head>
<title>Some Plain tests Embperl</title>
</head>
<body>
Here it starts with some HTML Text<P>
All values should be undefined:
$a = <BR>
$b = <BR>
$c = <BR>
$d = <BR>
$e = <BR>
First of all assign a value:
<BR>
Now we have some 'Umlaute':
Now lets look what we are getting from this:<BR>
(this is the value in $a) (this is the value in $a) äöü<BR>
And now a and b together: (this is the value in $a)(this is the value in $a)
äöü<P>
Here we have some HTML tags within the perl code, Embperl will delete them!<BR>
57
Embperl will also translate HMTL escapes to the right characters i.e. $a &lt; 6
will get the perl expression $a < 6: <BR>
1
Now they should have a value
$a = (this is the value in $a) <BR>
$b = (this is the value in $a) äöü <BR>
$c = 57 <BR>
$d = 1 <BR>
$e = 2 <BR>
a <br>
a <br>
a <br>
b is null <br>
a <br>
b is null <br>
a<br>
b is null <br>
<table></table>
<p> $tabmode = default <p>
<hr><p>Display an two dimensional array with one, two and three columns !<BR>
Please take a look at the source in your browser to see the difference<BR>
$a[0][0] = '1/1' ;<BR>
$a[1][0] = '2/1' ;<BR>
$a[1][1] = '2/2' ;<BR>
$a[2][0] = '3/1' ;<BR>
$a[2][1] = '3/2' ;<BR>
$a[2][2] = '3/3' ;<BR>
<P>$tabmode = default <P>
<table border="2" width="100%">
<tr>
<td>a1/1 </td>
</tr>
<tr>
<td>a2/1 </td>
<td>a2/2 </td>
</tr>
<tr>
<td>a3/1 </td>
<td>a3/2 </td>
<td>a3/3 </td>
</tr>
</table>
<table border="2" width="100%">
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
</tr>
<tr>
<td>a1/1 </td>
</tr>
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
</tr>
<tr>
<td>a2/1 </td>
<td>a2/2 </td>
</tr>
<tr>
<th>1</th>
<th>2</th>
<th>3</th>
</tr>
<tr>
<td>a3/1 </td>
<td>a3/2 </td>
<td>a3/3 </td>
</tr>
</table>
<table border="2" width="100%">
<tr>
<th>b3/1</th>
<th>b3/2</th>
<th>b3/3</th>
</tr>
<tr>
<td>a1/1 </td>
</tr>
<tr>
<th>b3/1</th>
<th>b3/2</th>
<th>b3/3</th>
</tr>
<tr>
<td>a2/1 </td>
<td>a2/2 </td>
</tr>
<tr>
<th>b3/1</th>
<th>b3/2</th>
<th>b3/3</th>
</tr>
<tr>
<td>a3/1 </td>
<td>a3/2 </td>
<td>a3/3 </td>
</tr>
</table>
<table>
<tr>
<td>
<table>
<tr>
<td>b1/1 </td>
</tr>
<tr>
<td>b2/1 </td>
<td>b2/2 </td>
</tr>
<tr>
<td>b3/1 </td>
<td>b3/2 </td>
<td>b3/3 </td>
</tr>
</table>
a1/1 </td>
</tr>
<tr>
<td>
<table>
<tr>
<td>b1/1 </td>
</tr>
<tr>
<td>b2/1 </td>
<td>b2/2 </td>
</tr>
<tr>
<td>b3/1 </td>
<td>b3/2 </td>
<td>b3/3 </td>
</tr>
</table>
a2/1 </td>
<td>
<table>
<tr>
<td>b1/1 </td>
</tr>
<tr>
<td>b2/1 </td>
<td>b2/2 </td>
</tr>
<tr>
<td>b3/1 </td>
<td>b3/2 </td>
<td>b3/3 </td>
</tr>
</table>
a2/2 </td>
</tr>
<tr>
<td>
<table>
<tr>
<td>b1/1 </td>
</tr>
<tr>
<td>b2/1 </td>
<td>b2/2 </td>
</tr>
<tr>
<td>b3/1 </td>
<td>b3/2 </td>
<td>b3/3 </td>
</tr>
</table>
a3/1 </td>
<td>
<table>
<tr>
<td>b1/1 </td>
</tr>
<tr>
<td>b2/1 </td>
<td>b2/2 </td>
</tr>
<tr>
<td>b3/1 </td>
<td>b3/2 </td>
<td>b3/3 </td>
</tr>
</table>
a3/2 </td>
<td>
<table>
<tr>
<td>b1/1 </td>
</tr>
<tr>
<td>b2/1 </td>
<td>b2/2 </td>
</tr>
<tr>
<td>b3/1 </td>
<td>b3/2 </td>
<td>b3/3 </td>
</tr>
</table>
a3/3 </td>
</tr>
</table>
<P><P>
<P><P>
<P>1<P>
<P>
<table>
<tr>
<td>ii[0] = 0 </td>
</tr>
<tr>
<td>ii[1] = 1 </td>
</tr>
<tr>
<td>ii[2] = 2 </td>
</tr>
<tr>
<td>ii[3] = 3 </td>
</tr>
<tr>
<td>ii[4] = 4 </td>
</tr>
<tr>
<td>ii[5] = 5 </td>
</tr>
<tr>
<td>ii[6] = 6 </td>
</tr>
<tr>
<td>ii[7] = 7 </td>
</tr>
<tr>
<td>ii[8] = 8 </td>
</tr>
<tr>
<td>ii[9] = 9 </td>
</tr>
</table>
</body>
</html>
</body>
</html>
1.52 +4 -5 embperl/test/conf/httpd.conf.src
Index: httpd.conf.src
===================================================================
RCS file: /home/cvs/embperl/test/conf/httpd.conf.src,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- httpd.conf.src 31 Jan 2003 05:16:00 -0000 1.51
+++ httpd.conf.src 27 Feb 2003 07:05:33 -0000 1.52
@@ -38,12 +38,11 @@
print OFH "$EPMODPERL\n" ;
+##print OFH "PerlModule Apache2\n" ;
+
print OFH "LoadModule embperl_module
\"$EPPATH/blib/arch/auto/Embperl/Embperl.so\"\n" if ($MP2) ;
-##print OFH "LoadModule dav_module \"$EPAPACHESRC/modules/mod_dav.dll\"\n" ;
-##print OFH "LoadModule info_module
\"/usr/src/packages/apache_1.3.24_mp561_so/src/modules/standard/mod_info.so\"\n" ;
-print OFH "PassEnv ACTION_PREFIX\n" ;
-##print OFH "PerlModule Apache2\n" ;
+##print OFH "PassEnv ACTION_PREFIX\n" ;
print OFH <<EOD ;
1.18 +1 -0 embperl/test/conf/startup.pl
Index: startup.pl
===================================================================
RCS file: /home/cvs/embperl/test/conf/startup.pl,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- startup.pl 22 Oct 2002 05:29:10 -0000 1.17
+++ startup.pl 27 Feb 2003 07:05:33 -0000 1.18
@@ -31,6 +31,7 @@
}
else
{
+ use Apache2 ;
require ModPerl::Registry ;
}
} ;
1.1 embperl/test/html/subreq.htm
Index: subreq.htm
===================================================================
<html>
<head>
<title>Embperl Tests - Apache 2 subrequest</title>
</head>
<body>
[- Execute ({subreq=>'/html/match/div.asc'}) -]
</body>
</html>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]