convert to Dist::Zilla
[catagits/Catalyst-Action-REST.git] / lib / Catalyst / Action / Serialize / Data / Serializer.pm
index ca42ce7..e993a17 100644 (file)
@@ -23,18 +23,14 @@ sub execute {
     };
     if ($@) {
         $c->log->info("Could not load $serializer, refusing to serialize: $@");
-        return 0;
+        return;
     }
     my $dso = Data::Serializer->new( serializer => $serializer );
-    my $data;
-    eval {
-       $data = $dso->raw_serialize($c->stash->{$stash_key});
-    };
-    if ($@) {
-        return $@;
-    } 
+    my $data = $dso->raw_serialize($c->stash->{$stash_key});
     $c->response->output( $data );
     return 1;
 }
 
+__PACKAGE__->meta->make_immutable;
+
 1;