Fixed config in C::Base and stash in C::Engine
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine.pm
index 1a2d3ee..d6673a2 100644 (file)
@@ -404,12 +404,18 @@ sub prepare {
                 cookies    => {},
                 headers    => HTTP::Headers->new,
                 parameters => {},
+                secure     => 0,
                 snippets   => [],
                 uploads    => {}
             }
         ),
         response => Catalyst::Response->new(
-            { cookies => {}, headers => HTTP::Headers->new, status => 200 }
+            {
+                body    => '',
+                cookies => {},
+                headers => HTTP::Headers->new,
+                status  => 200
+            }
         ),
         stash => {},
         state => 0
@@ -425,10 +431,10 @@ sub prepare {
     }
 
     $c->prepare_request($engine);
-    $c->prepare_path;
+    $c->prepare_connection;
     $c->prepare_headers;
     $c->prepare_cookies;
-    $c->prepare_connection;
+    $c->prepare_path;
     $c->prepare_action;
 
     my $method   = $c->req->method   || '';
@@ -692,8 +698,8 @@ Returns a hashref containing all your data.
 
 sub stash {
     my $self = shift;
-    if ( $_[0] ) {
-        my $stash = $_[1] ? {@_} : $_[0];
+    if ( @_ ) {
+        my $stash = @_ > 1 ? {@_} : $_[0];
         while ( my ( $key, $val ) = each %$stash ) {
             $self->{stash}->{$key} = $val;
         }