X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=99a876766007c85bb4803bf60fb543ad17c71d67;hp=c206761277dde0e7551178f8578de946ca4d78d4;hb=c82ed742c266d6ad53cf3f18214d392cd6d188f7;hpb=c81ae4e1a54b3016a91b61a19abfac302c21ecb7 diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index c206761..99a8767 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -324,8 +324,8 @@ sub stash { if (@_) { my $stash = @_ > 1 ? {@_} : $_[0]; croak('stash takes a hash or hashref') unless ref $stash; - while ( my ( $key, $val ) = each %$stash ) { - $c->{stash}->{$key} = $val; + foreach my $key ( keys %$stash ) { + $c->{stash}->{$key} = $stash->{$key}; } } return $c->{stash};