Commit | Line | Data |
256c894f |
1 | # |
2 | # Catlyst::Action::Serialize::YAML.pm |
3 | # Created by: Adam Jacob, Marchex, <adam@marchex.com> |
4 | # Created on: 10/12/2006 03:00:32 PM PDT |
5 | # |
6 | # $Id$ |
7 | |
8 | package Catalyst::Action::Serialize::YAML; |
9 | |
10 | use strict; |
11 | use warnings; |
12 | |
13 | use base 'Catalyst::Action'; |
14 | use YAML::Syck; |
15 | |
16 | sub execute { |
17 | my $self = shift; |
18 | my ( $controller, $c, $test ) = @_; |
19 | |
20 | my $stash_key = $controller->serialize->{'stash_key'} || 'rest'; |
256c894f |
21 | $c->response->output( Dump( $c->stash->{$stash_key} ) ); |
22 | return 1; |
eccb2137 |
23 | } |
256c894f |
24 | |
25 | 1; |