Fixed config in C::Base and stash in C::Engine
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine.pm
index d061984..d6673a2 100644 (file)
@@ -698,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;
         }