2 # Catlyst::Action::Serialize::XML::Simple.pm
3 # Created by: Adam Jacob, Marchex, <adam@hjksolutions.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: $@")
27 my $xs = XML::Simple->new(ForceArray => 0,);
30 $controller->{'serialize'} ?
31 $controller->{'serialize'}->{'stash_key'} :
32 $controller->{'stash_key'}
36 $output = $xs->XMLout({ data => $c->stash->{$stash_key} });
41 $c->response->output( $output );