1 package Catalyst::Action::Serialize::View;
3 use namespace::autoclean;
5 extends 'Catalyst::Action';
8 $VERSION = eval $VERSION;
12 my ( $controller, $c, $view ) = @_;
15 $controller->{'serialize'} ?
16 $controller->{'serialize'}->{'stash_key'} :
17 $controller->{'stash_key'}
20 if ( !$c->view($view) ) {
21 $c->log->error("Could not load $view, refusing to serialize");
25 if ($c->view($view)->process($c, $stash_key)) {
28 # This is stupid. Please improve it.
29 my $error = join("\n", @{ $c->error }) || "Error in $view";