Commit | Line | Data |
---|---|---|
256c894f | 1 | package Catalyst::Controller::REST; |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | use base 'Catalyst::Controller'; | |
6 | ||
7 | __PACKAGE__->mk_accessors(qw(serialize)); | |
8 | ||
9 | __PACKAGE__->config( | |
10 | serialize => { | |
7ad87df9 | 11 | 'default' => 'YAML', |
256c894f | 12 | 'stash_key' => 'rest', |
7ad87df9 | 13 | 'map' => { |
14 | 'text/x-yaml' => 'YAML', | |
15 | 'text/x-data-dumper' => [ 'Data::Serializer', 'Data::Dumper' ], | |
16 | }, | |
256c894f | 17 | } |
18 | ); | |
19 | ||
7ad87df9 | 20 | sub begin :ActionClass('Deserialize') {} |
256c894f | 21 | |
7ad87df9 | 22 | sub end :ActionClass('Serialize') {} |
256c894f | 23 | |
24 | 1; |