Index: STATUS
===================================================================
RCS file: /home/cvspublic/modperl-2.0/STATUS,v
retrieving revision 1.12
diff -u -I'$Id' -I'$Revision' -r1.12 STATUS
--- STATUS      17 Sep 2002 02:46:20 -0000      1.12
+++ STATUS      27 Sep 2002 10:09:11 -0000
@@ -58,8 +58,6 @@
   handler to actually convert the Perl code into apache config
   [Philippe M. Chiasson <[EMAIL PROTECTED]> is working on one]
 
-* 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

Index: lib/Apache/compat.pm
===================================================================
RCS file: /home/cvspublic/modperl-2.0/lib/Apache/compat.pm,v
retrieving revision 1.66
diff -u -I'$Id' -I'$Revision' -r1.66 compat.pm
--- lib/Apache/compat.pm        24 Aug 2002 16:26:22 -0000      1.66
+++ lib/Apache/compat.pm        27 Sep 2002 10:09:13 -0000
@@ -110,6 +110,13 @@
     Apache->server->log_error(@_);
 }
 
+sub httpd_conf {
+       shift;
+       my $err = Apache->server->add_config([split /\n/, join '', @_ ]);
+       die $err if $err;
+       return;
+}
+
 package Apache::Constants;
 
 use Apache::Const ();

Index: t/response/TestCompat/apache.pm
===================================================================
RCS file: /home/cvspublic/modperl-2.0/t/response/TestCompat/apache.pm,v
retrieving revision 1.2
diff -u -I'$Id' -I'$Revision' -r1.2 apache.pm
--- t/response/TestCompat/apache.pm     29 Aug 2002 02:28:44 -0000      1.2
+++ t/response/TestCompat/apache.pm     27 Sep 2002 10:09:15 -0000
@@ -16,7 +16,7 @@
 sub handler {
     my $r = shift;
 
-    plan $r, tests => 6;
+    plan $r, tests => 7;
 
     $r->send_http_header('text/plain');
 
@@ -39,7 +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;
 }
 

-- 
Philippe M. Chiasson <[EMAIL PROTECTED]>
eXtropia Pte. Ltd.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to