stas 2004/04/07 14:51:36
Modified: perl-framework/Apache-Test/lib/Apache TestConfig.pm
TestConfigPerl.pm
perl-framework/Apache-Test Changes
Log:
Since some of the inherited from the global httpd.conf modules require
mod_perl to be loaded first, orrange for that to happen.
Revision Changes Path
1.219 +28 -4
httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm
Index: TestConfig.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
retrieving revision 1.218
retrieving revision 1.219
diff -u -u -r1.218 -r1.219
--- TestConfig.pm 5 Apr 2004 04:35:21 -0000 1.218
+++ TestConfig.pm 7 Apr 2004 21:51:36 -0000 1.219
@@ -410,9 +410,25 @@
return undef;
}
-sub add_config {
+# adds the config to the head of the group instead of the tail
+# XXX: would be even better to add to a different sub-group
+# (e.g. preamble_first) of only those that want to be first and then,
+# make sure that they are dumped to the config file first in the same
+# group (e.g. preamble)
+sub add_config_first {
my $self = shift;
my $where = shift;
+ unshift @{ $self->{$where} }, $self->massage_config_args(@_);
+}
+
+sub add_config_last {
+ my $self = shift;
+ my $where = shift;
+ push @{ $self->{$where} }, $self->massage_config_args(@_);
+}
+
+sub massage_config_args {
+ my $self = shift;
my($directive, $arg, $data) = @_;
my $args = "";
@@ -443,15 +459,23 @@
(ref($arg) && (ref($arg) eq 'ARRAY') ? "@$arg" : $arg || "");
}
- push @{ $self->{$where} }, $args;
+ return $args;
+}
+
+sub postamble_first {
+ shift->add_config_first(postamble => @_);
}
sub postamble {
- shift->add_config(postamble => @_);
+ shift->add_config_last(postamble => @_);
+}
+
+sub preamble_first {
+ shift->add_config_first(preamble => @_);
}
sub preamble {
- shift->add_config(preamble => @_);
+ shift->add_config_last(preamble => @_);
}
sub postamble_register {
1.87 +6 -1
httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm
Index: TestConfigPerl.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -u -r1.86 -r1.87
--- TestConfigPerl.pm 31 Mar 2004 22:44:32 -0000 1.86
+++ TestConfigPerl.pm 7 Apr 2004 21:51:36 -0000 1.87
@@ -93,7 +93,12 @@
$cfg = "#$msg";
debug $msg;
}
- $self->preamble(IfModule => '!mod_perl.c', $cfg);
+
+ # modules like Embperl.so need mod_perl.so to be loaded first,
+ # so make sure that it's loaded before files inherited from the
+ # global httpd.conf
+ $self->preamble_first(IfModule => '!mod_perl.c', $cfg);
+
}
sub configure_inc {
1.118 +3 -0 httpd-test/perl-framework/Apache-Test/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -u -r1.117 -r1.118
--- Changes 5 Apr 2004 04:35:21 -0000 1.117
+++ Changes 7 Apr 2004 21:51:36 -0000 1.118
@@ -8,6 +8,9 @@
=item 1.10-dev
+Since some of the inherited from the global httpd.conf modules require
+mod_perl to be loaded first, orrange for that to happen. [Stas]
+
Don't try to set ulimit unlimited for coredumps on Solaris, unless run
as root [Rob Kinyon <[EMAIL PROTECTED]>]