X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Foptional_lighttpd-fastcgi-non-root.t;fp=t%2Foptional_lighttpd-fastcgi-non-root.t;h=5618014cf4507ddd27bac0fc7cf67c6f220b7af3;hb=3f5f2699dc0cb69fbb435bd748d2ac12466f182d;hp=d0a1183990e3166ea90ba92590051c4486be6f64;hpb=d0f0fcf6ec9f6445e3e241b3edcd3920886a02cf;p=catagits%2FCatalyst-Runtime.git diff --git a/t/optional_lighttpd-fastcgi-non-root.t b/t/optional_lighttpd-fastcgi-non-root.t index d0a1183..5618014 100644 --- a/t/optional_lighttpd-fastcgi-non-root.t +++ b/t/optional_lighttpd-fastcgi-non-root.t @@ -4,7 +4,6 @@ use strict; use warnings; use File::Path; -use File::Slurp qw(write_file); use FindBin; use IO::Socket; use Test::More; @@ -21,8 +20,6 @@ plan skip_all => 'Please set LIGHTTPD_BIN to run this test' plan tests => 1; -require File::Slurp; - # clean up rmtree "$FindBin::Bin/../t/tmp" if -d "$FindBin::Bin/../t/tmp"; @@ -43,7 +40,7 @@ my $port = 8529; # 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", @@ -72,9 +69,11 @@ fastcgi.server = ( ) ) ) -}; +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: $!"; @@ -113,4 +112,4 @@ sub check_port { else { return 0; } -} \ No newline at end of file +}