X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=8e7c4fee113a0888ea66e6c1cf5f5cdd67f1d56c;hb=efeeb25772af5f67012ed1fdbef9a9d4e01ad64c;hp=c409eb015e574fd20eaf206340ac067385f44e95;hpb=817ed8ab62b7b59cc37e82d67aa45824211f75f6;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index c409eb0..8e7c4fe 100755 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -498,15 +498,7 @@ Catalyst). sub stash { my $c = shift; - my $stash = Catalyst::Middleware::Stash->get($c->req->env); - if(@_) { - my $new_stash = @_ > 1 ? {@_} : $_[0]; - croak('stash takes a hash or hashref') unless ref $new_stash; - foreach my $key ( keys %$new_stash ) { - $stash->{$key} = $new_stash->{$key}; - } - } - return $stash; + return Catalyst::Middleware::Stash::get_stash($c->req->env)->(@_); } =head2 $c->error