plan tests => 1;
-require File::Slurp;
-
# clean up
rmtree "$FindBin::Bin/../t/tmp" if -d "$FindBin::Bin/../t/tmp";
# Clean up docroot path
$docroot =~ s{/t/..}{};
-my $conf = qq{
+my $conf = <<"END";
# basic lighttpd config file for testing fcgi+catalyst
server.modules = (
"mod_access",
)
)
)
-};
+END
-File::Slurp::write_file( "$docroot/lighttpd.conf", $conf );
+open(my $lightconf, '>', "$docroot/lighttpd.conf") or die "Can't open $docroot/lighttpd.conf: $!";
+print {$lightconf} $conf or die "Write error: $!";
+close $lightconf;
my $pid = open my $lighttpd, "$lighttpd_bin -D -f $docroot/lighttpd.conf 2>&1 |"
or die "Unable to spawn lighttpd: $!";
else {
return 0;
}
-}
\ No newline at end of file
+}