stas 01/12/30 22:39:30
Modified: perl-framework/Apache-Test/lib/Apache TestConfig.pm
Log:
- when dieing on invalid tokens report the token and the its filename if
available.
Revision Changes Path
1.118 +11 -1
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.117
retrieving revision 1.118
diff -u -r1.117 -r1.118
--- TestConfig.pm 21 Dec 2001 12:44:16 -0000 1.117
+++ TestConfig.pm 31 Dec 2001 06:39:30 -0000 1.118
@@ -755,7 +755,15 @@
sub replace {
my $self = shift;
- s/@(\w+)@/$self->{vars}->{lc $1}/g;
+ my $file = $Apache::TestConfig::File
+ ? "in file $Apache::TestConfig::File" : '';
+
+ s[@(\w+)@]
+ [ my $key = lc $1;
+ exists $self->{vars}->{$key}
+ ? $self->{vars}->{$key}
+ : die "invalid token: [EMAIL PROTECTED]@ $file\n";
+ ]ge;
}
#need to configure the vhost port for redirects and $ENV{SERVER_PORT}
@@ -938,6 +946,8 @@
}
for my $file (@conf_files) {
+ local $Apache::TestConfig::File = $file;
+
(my $generated = $file) =~ s/\.in$//;
push @extra_conf, $generated;