Return-Path: Delivered-To: apmail-httpd-test-cvs-archive@httpd.apache.org Received: (qmail 77552 invoked by uid 500); 31 Dec 2001 06:39:36 -0000 Mailing-List: contact test-cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-cvs@httpd.apache.org Received: (qmail 77541 invoked from network); 31 Dec 2001 06:39:36 -0000 Date: 31 Dec 2001 06:39:30 -0000 Message-ID: <20011231063930.47661.qmail@icarus.apache.org> From: stas@apache.org To: httpd-test-cvs@apache.org Subject: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: \@$1\@ $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;