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