dougm 2002/10/06 19:44:30 Modified: . Changes STATUS lib/Apache compat.pm t/response/TestCompat apache.pm Log: Submitted by: gozer Reviewed by: dougm add Apache->httpd_conf compat method Revision Changes Path 1.52 +3 -0 modperl-2.0/Changes Index: Changes =================================================================== RCS file: /home/cvs/modperl-2.0/Changes,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- Changes 7 Oct 2002 02:35:18 -0000 1.51 +++ Changes 7 Oct 2002 02:44:30 -0000 1.52 @@ -10,6 +10,9 @@ =item 1.99_08-dev +add Apache->httpd_conf compat method +[Philippe M. Chiasson <[EMAIL PROTECTED]>] + add default <Perl> handler Apache::PerlSection. make <Perl> blocks to be EXEC_ON_READ so apache does not parse the contents. add "Perl" directive for general use and for which <Perl> sections are 1.14 +1 -3 modperl-2.0/STATUS Index: STATUS =================================================================== RCS file: /home/cvs/modperl-2.0/STATUS,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- STATUS 7 Oct 2002 02:35:18 -0000 1.13 +++ STATUS 7 Oct 2002 02:44:30 -0000 1.14 @@ -54,8 +54,6 @@ Needs Patch or Further Investigation: ------------------------------------- -* Apache->httpd_conf compat method mapping to Apache::Server->add_config - * directive handlers are supported but need some work for 1.x compat - Apache::ModuleConfig->get needs a compat method mapping to Apache::Module->get_config 1.67 +6 -0 modperl-2.0/lib/Apache/compat.pm Index: compat.pm =================================================================== RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v retrieving revision 1.66 retrieving revision 1.67 diff -u -r1.66 -r1.67 --- compat.pm 24 Aug 2002 16:26:22 -0000 1.66 +++ compat.pm 7 Oct 2002 02:44:30 -0000 1.67 @@ -110,6 +110,12 @@ Apache->server->log_error(@_); } +sub httpd_conf { + shift; + my $err = Apache->server->add_config([split /\n/, join '', @_]); + die $err if $err; +} + package Apache::Constants; use Apache::Const (); 1.3 +7 -1 modperl-2.0/t/response/TestCompat/apache.pm Index: apache.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestCompat/apache.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- apache.pm 29 Aug 2002 02:28:44 -0000 1.2 +++ apache.pm 7 Oct 2002 02:44:30 -0000 1.3 @@ -16,7 +16,7 @@ sub handler { my $r = shift; - plan $r, tests => 6; + plan $r, tests => 7; $r->send_http_header('text/plain'); @@ -39,6 +39,12 @@ ok t_cmp("httpd/unix-directory", DIR_MAGIC_TYPE, 'DIR_MAGIC_TYPE'); + + my $admin = $r->server->server_admin; + Apache->httpd_conf('ServerAdmin [EMAIL PROTECTED]'); + ok t_cmp('[EMAIL PROTECTED]', $r->server->server_admin, + 'Apache->httpd_conf'); + $r->server->server_admin($admin); OK; }