Ran perltidy
[catagits/Catalyst-Action-REST.git] / lib / Catalyst / Action / Serialize / Data / Serializer.pm
1 #
2 # Catalyst::Action::Serialize::Data::Serializer
3 # Created by: Adam Jacob, Marchex, <adam@marchex.com>
4 #
5 # $Id$
6
7 package Catalyst::Action::Serialize::Data::Serializer;
8
9 use strict;
10 use warnings;
11
12 use base 'Catalyst::Action';
13 use Data::Serializer;
14
15 sub execute {
16     my $self = shift;
17     my ( $controller, $c, $serializer ) = @_;
18
19     my $stash_key = $controller->serialize->{'stash_key'} || 'rest';
20     my $dso = Data::Serializer->new( serializer => $serializer );
21     $c->response->output( $dso->raw_serialize( $c->stash->{$stash_key} ) );
22     return 1;
23 }
24
25 1;