dougm 01/12/13 16:17:28
Modified: perl-framework/Apache-Test/lib/Apache TestConfig.pm
Log:
option to leave out generated warning in writefile
Revision Changes Path
1.98 +5 -3
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.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- TestConfig.pm 2001/12/13 19:01:43 1.97
+++ TestConfig.pm 2001/12/14 00:17:28 1.98
@@ -620,7 +620,7 @@
# gen + write file
sub writefile {
- my($self, $file, $content) = @_;
+ my($self, $file, $content, $nowarning) = @_;
# create the parent dir if it doesn't exist yet
my $dir = dirname $file;
@@ -632,8 +632,10 @@
my $fh = Symbol::gensym();
open $fh, ">$file" or die "open $file: $!";
- if (my $msg = $self->genwarning($file)) {
- print $fh $msg, "\n";
+ unless ($nowarning) {
+ if (my $msg = $self->genwarning($file)) {
+ print $fh $msg, "\n";
+ }
}
if ($content) {