httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject sub write_file
Date Fri, 31 Aug 2001 09:11:39 GMT
Doug,

I think it'll be useful to add:

+sub write_file{
+    my $file = shift;
+    open my $fh, ">$file" or die "can't open $file: $!";
+    print "writing $file\n";
+    print $fh join '', @_ if @_;
+    close $fh;
 }

to Apache/TestConfig.pm, I know we have genfile(), but if you just have a
few bits to throw in write_file is slicker. This is especially useful for
test files.

Also if you look at vhost_alias.t there is a bunch of things created and
deleted all the time. If we add the APACHE_TEST_CONFIGURE and
APACHE_TEST_CLEANUP and run these only once (in other tests as well), the
tests suit will run significantly faster. I think. But then I thought
about .pm files to put these in and not .t files.

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide
mailto:stas@stason.org   http://localhost/      http://eXtropia.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



Mime
View raw message