X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAction%2FSerialize%2FXML%2FSimple.pm;h=5b35c7e4cfd5d1b18da17e7f27eba59c00de981e;hb=HEAD;hp=a56207859622847acfe94d3d416973ab252c199a;hpb=930013e6f19b25a090c3f8839495ad8d9b15ff6d;p=catagits%2FCatalyst-Action-REST.git diff --git a/lib/Catalyst/Action/Serialize/XML/Simple.pm b/lib/Catalyst/Action/Serialize/XML/Simple.pm index a562078..5b35c7e 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,15 +24,11 @@ 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; } +__PACKAGE__->meta->make_immutable; + 1;