X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Action-REST.git;a=blobdiff_plain;f=lib%2FCatalyst%2FAction%2FSerialize%2FXML%2FSimple.pm;h=a3675969678f1ce40f2ead42efb1a20a1265a8d1;hp=a56207859622847acfe94d3d416973ab252c199a;hb=71cbfa6b6eb4670d838af0f640c1c2402637f2c4;hpb=68c266124de8e212143d4b94c55982f986f6945c diff --git a/lib/Catalyst/Action/Serialize/XML/Simple.pm b/lib/Catalyst/Action/Serialize/XML/Simple.pm index a562078..a367596 100644 --- a/lib/Catalyst/Action/Serialize/XML/Simple.pm +++ b/lib/Catalyst/Action/Serialize/XML/Simple.pm @@ -15,7 +15,7 @@ sub execute { if ($@) { $c->log->debug("Could not load XML::Serializer, refusing to serialize: $@") if $c->debug; - return 0; + return; } my $xs = XML::Simple->new(ForceArray => 0,); @@ -24,13 +24,7 @@ sub execute { $controller->{'serialize'}->{'stash_key'} : $controller->{'stash_key'} ) || 'rest'; - my $output; - eval { - $output = $xs->XMLout({ data => $c->stash->{$stash_key} }); - }; - if ($@) { - return $@; - } + my $output = $xs->XMLout({ data => $c->stash->{$stash_key} }); $c->response->output( $output ); return 1; }