package Test::Serialize::Controller::REST;
-use warnings;
-use strict;
+use namespace::autoclean;
+use Moose;
-use base qw/Catalyst::Controller::REST/;
+BEGIN { extends qw/Catalyst::Controller::REST/ };
__PACKAGE__->config(
'namespace' => '',
sub monkey_put : Local : ActionClass('Deserialize') {
my ( $self, $c ) = @_;
- if ( ref($c->req->data) eq "HASH" ) {
- $c->res->output( $c->req->data->{'sushi'} );
- } else {
- $c->res->output(1);
- }
+ if ( ref($c->req->data) eq "HASH" ) {
+ my $out = $c->req->data->{'sushi'} . $c->req->data->{'chicken'}||'';
+ utf8::encode($out);
+ $c->res->output( $out );
+ } else {
+ $c->res->output(1);
+ }
}
sub monkey_get : Local : ActionClass('Serialize') {
}
1;
-