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=2645e6e9f2fb34e49bd6fcdf448b95073f6be9e7;hp=2a9119373b8cde56c87a1baabaa5a0c8d2233bec;hb=8a1b06bea91f32966b5f067d6502209e0338827f;hpb=1c9c3b77c6192f4cdb713b60ee9472b112a43d5a diff --git a/t/lib/TestApp/Controller/Fork.pm b/t/lib/TestApp/Controller/Fork.pm index 2a91193..2645e6e 100644 --- a/t/lib/TestApp/Controller/Fork.pm +++ b/t/lib/TestApp/Controller/Fork.pm @@ -7,7 +7,7 @@ use strict; use warnings; use base 'Catalyst::Controller'; -eval 'use YAML'; +use JSON::MaybeXS qw(encode_json); sub system : Local { my ($self, $c, $ls) = @_; @@ -21,7 +21,7 @@ sub system : Local { $result = $! if $result != 0; } - $c->response->body(Dump({result => $result})); + $c->response->body(encode_json({result => $result})); } sub backticks : Local { @@ -37,7 +37,7 @@ sub backticks : Local { $code = $?; } - $c->response->body(Dump({result => $result, code => $code})); + $c->response->body(encode_json({result => $result, code => $code})); } sub fork : Local { @@ -54,7 +54,7 @@ sub fork : Local { waitpid $pid,0 or die; - $c->response->body(Dump({pid => $pid, result => $x})); + $c->response->body(encode_json({pid => $pid, result => $x})); } 1;