2 # Catlyst::Action::Serialize::XML::Simple.pm
3 # Created by: Adam Jacob, Marchex, <adam@marchex.com>
4 # Created on: 10/12/2006 03:00:32 PM PDT
8 package Catalyst::Action::Serialize::XML::Simple;
13 use base 'Catalyst::Action';
17 my ( $controller, $c ) = @_;
23 $c->log->debug("Could not load XML::Serializer, refusing to serialize: $@");
26 my $xs = XML::Simple->new(ForceArray => 0,);
28 my $stash_key = $controller->config->{'serialize'}->{'stash_key'} || 'rest';
31 $output = $xs->XMLout({ data => $c->stash->{$stash_key} });
36 $c->response->output( $output );