You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@hyperreal.org on 1998/08/08 00:00:13 UTC
cvs commit: modperl/t/docs startup.pl
dougm 98/08/07 15:00:13
Modified: . Changes
src/modules/perl mod_perl.c perl_config.c
t/conf httpd.conf.pl
t/docs startup.pl
Log:
add =pod config support for '={begin,for} apache ... =end apache'
Revision Changes Path
1.103 +2 -0 modperl/Changes
Index: Changes
===================================================================
RCS file: /export/home/cvs/modperl/Changes,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -r1.102 -r1.103
--- Changes 1998/08/06 16:52:39 1.102
+++ Changes 1998/08/07 22:00:08 1.103
@@ -8,6 +8,8 @@
=item 1.15_01-dev
+add =pod config support for '={begin,for} apache ... =end apache'
+
Apache::TieHashTable->get in list context will return all values found for
the given key
1.37 +1 -0 modperl/src/modules/perl/mod_perl.c
Index: mod_perl.c
===================================================================
RCS file: /export/home/cvs/modperl/src/modules/perl/mod_perl.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- mod_perl.c 1998/07/30 15:37:21 1.36
+++ mod_perl.c 1998/08/07 22:00:09 1.37
@@ -88,6 +88,7 @@
{ "</Perl>", perl_end_section, NULL, OR_ALL, NO_ARGS, "End Perl code" },
#endif
{ "=pod", perl_pod_section, NULL, OR_ALL, RAW_ARGS, "Start of POD" },
+ { "=end", perl_pod_section, NULL, OR_ALL, RAW_ARGS, "End of =begin" },
{ "=cut", perl_pod_end_section, NULL, OR_ALL, NO_ARGS, "End of POD" },
{ "__END__", perl_config_END, NULL, OR_ALL, RAW_ARGS, "Stop reading config" },
{ "PerlFreshRestart", perl_cmd_fresh_restart,
1.30 +16 -1 modperl/src/modules/perl/perl_config.c
Index: perl_config.c
===================================================================
RCS file: /export/home/cvs/modperl/src/modules/perl/perl_config.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- perl_config.c 1998/08/07 01:38:07 1.29
+++ perl_config.c 1998/08/07 22:00:10 1.30
@@ -611,13 +611,28 @@
return NULL;
}
+#define APACHE_POD_FORMAT(s) \
+ (strnEQ(s, "httpd", 5) || strnEQ(s, "apache", 6))
+
CHAR_P perl_pod_section (cmd_parms *parms, void *dummy, const char *arg)
{
char l[MAX_STRING_LEN];
+ if(arg && strlen(arg) && !APACHE_POD_FORMAT(arg))
+ return "Unknown =end format";
+
while (!(cfg_getline (l, MAX_STRING_LEN, cmd_infile))) {
+ int chop = 4;
if(strnEQ(l, "=cut", 4))
break;
+ if(strnEQ(l, "=for", chop) ||
+ ((chop = 6) && strnEQ(l, "=begin", chop)))
+ {
+ char *tmp = l;
+ tmp += chop; while(isspace(*tmp)) tmp++;
+ if(APACHE_POD_FORMAT(tmp))
+ break;
+ }
}
return NULL;
@@ -626,7 +641,7 @@
static const char perl_pod_end_magic[] = "=cut without =pod";
CHAR_P perl_pod_end_section (cmd_parms *cmd, void *dummy) {
- return perl_pod_end_magic;
+ return NULL;
}
void mod_perl_cleanup_av(void *data)
1.15 +2 -2 modperl/t/conf/httpd.conf.pl
Index: httpd.conf.pl
===================================================================
RCS file: /export/home/cvs/modperl/t/conf/httpd.conf.pl,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- httpd.conf.pl 1998/07/30 15:37:28 1.14
+++ httpd.conf.pl 1998/08/07 22:00:11 1.15
@@ -72,7 +72,7 @@
$My::config_is_perl = 1;
my $dir = $Apache::Server::CWD;
-$dir .= "/t" if -d "t";
+$dir .= "/t"; # if -d "t";
my $Is_Win32 = ($^O eq "MSWin32");
sub prompt ($;$) {
@@ -99,7 +99,7 @@
}
print "Will run tests as User: '$User' Group: '$Group'\n";
-require 't/net/config.pl';
+require 'net/config.pl';
my $srv = $net::httpserver;
($srv = $net::httpserver) =~ s/\D+$//;
$Port = (split ":", $srv, 2)[1];
1.17 +1 -1 modperl/t/docs/startup.pl
Index: startup.pl
===================================================================
RCS file: /export/home/cvs/modperl/t/docs/startup.pl,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- startup.pl 1998/07/30 15:37:29 1.16
+++ startup.pl 1998/08/07 22:00:12 1.17
@@ -53,7 +53,7 @@
$ENV{KeyForPerlSetEnv} eq "OK" or warn "PerlSetEnv is broken\n";
%net::callback_hooks = ();
-require "./t/net/config.pl";
+require "net/config.pl";
if($net::callback_hooks{PERL_SAFE_STARTUP}) {
eval "open \$0";
unless ($@ =~ /open trapped by operation mask/) {