View is halfway there. Do we want to poke in $c->error? Maybe not.
[catagits/Catalyst-Action-REST.git] / lib / Catalyst / Action / Serialize / View.pm
index 630a4e7..baaec85 100644 (file)
@@ -1,8 +1,8 @@
 package Catalyst::Action::Serialize::View;
-use strict;
-use warnings;
+use Moose;
+use namespace::autoclean;
 
-use base 'Catalyst::Action';
+extends 'Catalyst::Action';
 
 sub execute {
     my $self = shift;
@@ -16,10 +16,10 @@ sub execute {
 
     if ( !$c->view($view) ) {
         $c->log->error("Could not load $view, refusing to serialize");
-        return 0;
+        return;
     }
 
-    return $c->view($view)->process($c);
+    return $c->view($view)->process($c, $stash_key);
 }
 
 1;