Author: stas
Date: Fri Dec 10 09:56:37 2004
New Revision: 111533

URL: http://svn.apache.org/viewcvs?view=rev&rev=111533
Log:
some perl builds were unhappy with the move of some code to post_config 
phase:
- tweak the post_config register function (was breaking non-threaded 
perls)
- move test_apache_resource back to startup.pl until we figure out why it 
doesn't do the same thing from the post_config phase

Modified:
   perl/modperl/trunk/t/conf/modperl_extra.pl
   perl/modperl/trunk/t/conf/post_config_startup.pl

Modified: perl/modperl/trunk/t/conf/modperl_extra.pl
Url: 
http://svn.apache.org/viewcvs/perl/modperl/trunk/t/conf/modperl_extra.pl?view=diff&rev=111533&p1=perl/modperl/trunk/t/conf/modperl_extra.pl&r1=111532&p2=perl/modperl/trunk/t/conf/modperl_extra.pl&r2=111533
==============================================================================
--- perl/modperl/trunk/t/conf/modperl_extra.pl  (original)
+++ perl/modperl/trunk/t/conf/modperl_extra.pl  Fri Dec 10 09:56:37 2004
@@ -37,6 +37,10 @@
 
 test_method_obj();
 
+test_apache_resource();
+
+
+
 ### only subs below this line ###
 
 sub reorg_INC {
@@ -59,15 +63,15 @@
 }
 
 sub register_post_config_startup {
-    my $s = Apache->server;
-    my $pool = $s->process->pool;
-    my $t_conf_path = Apache::ServerUtil::server_root_relative($pool,
-                                                               "conf");
-
     # most of the startup code needs to be run at the post_config
     # phase
-    $s->push_handlers(PerlPostConfigHandler => sub {
-        require "$t_conf_path/post_config_startup.pl"; Apache::OK });
+    Apache->server->push_handlers(PerlPostConfigHandler => sub {
+        my $pool = Apache->server->process->pool;
+        my $t_conf_path = Apache::ServerUtil::server_root_relative($pool,
+                                                                   "conf");
+        require "$t_conf_path/post_config_startup.pl";
+        return Apache::OK;
+    });
 }
 
 sub startup_info {
@@ -148,6 +152,22 @@
     # see t/modperl/methodobj
     require TestModperl::methodobj;
     $TestModperl::MethodObj = TestModperl::methodobj->new;
+}
+
+sub test_apache_resource {
+    ### Apache::Resource tests
+
+    # load first for the menu
+    require Apache::Status;
+
+    # uncomment for local tests
+    #$ENV{PERL_RLIMIT_DEFAULTS} = 1;
+    #$Apache::Resource::Debug   = 1;
+
+    # requires optional BSD::Resource
+    return unless eval { require BSD::Resource };
+
+    require Apache::Resource;
 }
 
 sub ModPerl::Test::add_config {

Modified: perl/modperl/trunk/t/conf/post_config_startup.pl
Url: 
http://svn.apache.org/viewcvs/perl/modperl/trunk/t/conf/post_config_startup.pl?view=diff&rev=111533&p1=perl/modperl/trunk/t/conf/post_config_startup.pl&r1=111532&p2=perl/modperl/trunk/t/conf/post_config_startup.pl&r2=111533
==============================================================================
--- perl/modperl/trunk/t/conf/post_config_startup.pl    (original)
+++ perl/modperl/trunk/t/conf/post_config_startup.pl    Fri Dec 10 09:56:37 2004
@@ -31,8 +31,6 @@
 
 test_loglevel();
 
-test_apache_resource();
-
 test_perl_ithreads();
 
 test_server_shutdown_cleanup_register();
@@ -58,23 +56,6 @@
     # restore
     $s->loglevel($oldloglevel);
 }
-
-sub test_apache_resource {
-    ### Apache::Resource tests
-
-    # load first for the menu
-    require Apache::Status;
-
-    # uncomment for local tests
-    #$ENV{PERL_RLIMIT_DEFAULTS} = 1;
-    #$Apache::Resource::Debug   = 1;
-
-    # requires optional BSD::Resource
-    return unless eval { require BSD::Resource };
-
-    require Apache::Resource;
-}
-
 
 sub test_perl_ithreads {
     # this is needed for TestPerl::ithreads

Reply via email to