You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-commits@perl.apache.org by to...@apache.org on 2008/07/16 09:36:03 UTC
svn commit: r677183 - in /perl/Apache-Test/trunk: Changes
lib/Apache/TestConfigParse.pm
Author: torsten
Date: Wed Jul 16 00:36:02 2008
New Revision: 677183
URL: http://svn.apache.org/viewvc?rev=677183&view=rev
Log:
Inherit LoadFile directives from the global httpd.conf
Modified:
perl/Apache-Test/trunk/Changes
perl/Apache-Test/trunk/lib/Apache/TestConfigParse.pm
Modified: perl/Apache-Test/trunk/Changes
URL: http://svn.apache.org/viewvc/perl/Apache-Test/trunk/Changes?rev=677183&r1=677182&r2=677183&view=diff
==============================================================================
--- perl/Apache-Test/trunk/Changes (original)
+++ perl/Apache-Test/trunk/Changes Wed Jul 16 00:36:02 2008
@@ -8,6 +8,9 @@
=item 1.31-dev
+Inherit LoadFile directives from the global httpd.conf
+[Torsten Foertsch <torsten.foertsch@gmx.net]
+
Don't overwrite php.ini if it already exists
PR: 32994
[MAHEX <MA...@cpan.org>]
Modified: perl/Apache-Test/trunk/lib/Apache/TestConfigParse.pm
URL: http://svn.apache.org/viewvc/perl/Apache-Test/trunk/lib/Apache/TestConfigParse.pm?rev=677183&r1=677182&r2=677183&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestConfigParse.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestConfigParse.pm Wed Jul 16 00:36:02 2008
@@ -33,7 +33,7 @@
my %wanted_config = (
TAKE1 => {map { $_, 1 } qw(ServerRoot ServerAdmin TypesConfig DocumentRoot)},
- TAKE2 => {map { $_, 1 } qw(LoadModule)},
+ TAKE2 => {map { $_, 1 } qw(LoadModule LoadFile)},
);
my %spec_init = (
@@ -46,6 +46,7 @@
ServerRoot => sub {}, #dont override $self->{vars}->{serverroot}
DocumentRoot => \&inherit_directive_var,
LoadModule => \&inherit_load_module,
+ LoadFile => \&inherit_load_file,
);
#where to add config, default is preamble
@@ -247,6 +248,32 @@
}
}
+#inherit LoadFile
+sub inherit_load_file {
+ my($self, $c, $directive) = @_;
+
+ for my $args (@{ $c->{$directive} }) {
+ my $file = $self->server_file_rel2abs($args->[0]);
+
+ unless (-e $file) {
+ debug "$file does not exist, skipping LoadFile";
+ next;
+ }
+
+ if ($self->should_skip_module($args->[0])) {
+ debug "Skipping LoadFile of $args->[0]";
+ next;
+ }
+
+ # remember all found modules
+ push @{$self->{load_file}}, $file;
+
+ debug "LoadFile $file";
+
+ $self->preamble_first(qq{LoadFile "$file"\n});
+ }
+}
+
sub parse_take1 {
my($self, $c, $directive) = @_;
$c->{$directive} = strip_quotes;