1 package Test::Catalyst::Action::REST::Controller::Serialize;
5 use base 'Catalyst::Controller';
8 'default' => 'text/x-yaml',
11 'text/x-yaml' => 'YAML',
12 'application/json' => 'JSON',
13 'text/x-data-dumper' => [ 'Data::Serializer', 'Data::Dumper' ],
14 'text/broken' => 'Broken',
18 sub test :Local :ActionClass('Serialize') {
19 my ( $self, $c ) = @_;
20 $c->stash->{'rest'} = {
25 sub test_second :Local :ActionClass('Serialize') {
26 my ( $self, $c ) = @_;
27 # 'serialize_content_type' is configured in the test config in t/conf
28 $c->stash->{'serialize_content_type'} = $c->req->params->{'serialize_content_type'};
29 $c->stash->{'rest'} = {