httpd-test-dev mailing list archives

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

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/, 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       mod_perl Guide   http://localhost/

View raw message