jorton 2003/03/20 06:06:04
Modified: perl-framework/Apache-Test/lib/Apache TestConfigPerl.pm
Log:
Fix errors during configuration due to parse_vhost returning undef.
Reviewed and rewritten by: Stas Bekman
Revision Changes Path
1.66 +8 -4
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.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- TestConfigPerl.pm 3 Feb 2003 02:18:32 -0000 1.65
+++ TestConfigPerl.pm 20 Mar 2003 14:06:04 -0000 1.66
@@ -316,11 +316,15 @@
my($self, $line, $indent) = @_;
my $cfg = $self->parse_vhost($line);
- my $port = $cfg->{port};
- $cfg->{out_postamble}->();
- $self->postamble("$indent<VirtualHost _default_:$port>");
- $cfg->{in_postamble}->();
+ if ($cfg) {
+ my $port = $cfg->{port};
+ $cfg->{out_postamble}->();
+ $self->postamble("$indent<VirtualHost _default_:$port>");
+ $cfg->{in_postamble}->();
+ } else {
+ $self->postamble("$indent$line");
+ }
}
#the idea for each group: