X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flib%2FTestApp%2FController%2FFork.pm;h=5690efa5cd24b9eaaefc788a25c536850de0e60c;hp=2645e6e9f2fb34e49bd6fcdf448b95073f6be9e7;hb=88e5a8b0c4d28e46b8ba6b6b9567063e57af9063;hpb=9868e0a0023cc8b598d60f150ea367e0056a65f3 diff --git a/t/lib/TestApp/Controller/Fork.pm b/t/lib/TestApp/Controller/Fork.pm index 2645e6e..5690efa 100644 --- a/t/lib/TestApp/Controller/Fork.pm +++ b/t/lib/TestApp/Controller/Fork.pm @@ -1,4 +1,4 @@ -# Fork.pm +# Fork.pm # Copyright (c) 2006 Jonathan Rockway package TestApp::Controller::Fork; @@ -13,22 +13,22 @@ sub system : Local { my ($self, $c, $ls) = @_; my ($result, $code) = (undef, 1); - if(!-e $ls || !-x _){ + if(!-e $ls || !-x _){ $result = 'skip'; } else { $result = system($ls, $ls, $ls); $result = $! if $result != 0; } - + $c->response->body(encode_json({result => $result})); } sub backticks : Local { my ($self, $c, $ls) = @_; my ($result, $code) = (undef, 1); - - if(!-e $ls || !-x _){ + + if(!-e $ls || !-x _){ $result = 'skip'; $code = 0; } @@ -36,7 +36,7 @@ sub backticks : Local { $result = `$ls $ls $ls` || $!; $code = $?; } - + $c->response->body(encode_json({result => $result, code => $code})); } @@ -44,7 +44,7 @@ sub fork : Local { my ($self, $c) = @_; my $pid; my $x = 0; - + if($pid = fork()){ $x = "ok"; } @@ -53,7 +53,7 @@ sub fork : Local { } waitpid $pid,0 or die; - + $c->response->body(encode_json({pid => $pid, result => $x})); }