Configuration patches to handle component based configuration in a sane way, as well...
[catagits/Catalyst-Action-REST.git] / lib / Catalyst / Action / Serialize / YAML / HTML.pm
index 40a04f7..0fce953 100644 (file)
@@ -18,7 +18,11 @@ sub execute {
     my $self = shift;
     my ( $controller, $c ) = @_;
 
-    my $stash_key = $controller->config->{'serialize'}->{'stash_key'} || 'rest';
+    my $stash_key = (
+            $controller->config->{'serialize'} ?
+                $controller->config->{'serialize'}->{'stash_key'} :
+                $controller->config->{'stash_key'} 
+        ) || 'rest';
     my $app = $c->config->{'name'} || '';
     my $output = "<html>";
     $output .= "<title>" . $app . "</title>";