Added Test Suite
[catagits/Catalyst-Action-Serialize-Data-Serializer.git] / lib / Catalyst / Controller / REST.pm
index 22535e4..8b3a064 100644 (file)
@@ -8,12 +8,17 @@ __PACKAGE__->mk_accessors(qw(serialize));
 
 __PACKAGE__->config(
     serialize => {
+        'default' => 'YAML',
         'stash_key' => 'rest',
+        'map' => {
+            'text/x-yaml' => 'YAML',
+            'text/x-data-dumper' => [ 'Data::Serializer', 'Data::Dumper' ],
+        },
     }
 );
 
-sub begin :ActionClass('Deserialize::YAML') {}
+sub begin :ActionClass('Deserialize') {}
 
-sub end :ActionClass('Serialize::YAML') {}
+sub end :ActionClass('Serialize') {}
 
 1;