'default' => 'text/x-yaml',
'stash_key' => 'rest',
'map' => {
- 'text/x-yaml' => 'YAML',
- 'application/json' => 'JSON',
'text/x-data-dumper' => [ 'Data::Serializer', 'Data::Dumper' ],
- 'text/broken' => 'Broken',
},
);
sub empty_serialized :Chained('empty') Args(0) ActionClass('Serialize') {
}
-# Undef body
-sub empty_not_serialized_undef :Chained('empty') Args(0) ActionClass('Serialize') {
- my ($self, $c) = @_;
- $c->res->body(undef);
-}
-
# Blank body
sub empty_not_serialized_blank :Chained('empty') Args(0) ActionClass('Serialize') {
my ($self, $c) = @_;
$c->res->body('');
}
+# Explicitly set a view
+sub explicit_view :Chained('empty') Args(0) ActionClass('Serialize') {
+ my ($self, $c) = @_;
+ $c->stash->{current_view} = '';
+}
+
1;