1 package ## Hide from pause
2 Catalyst::Middleware::Stash;
4 # Please don't use this, this is likely to go away before stable version is
5 # released. Ideally this could be a stand alone distribution.
10 use base 'Plack::Middleware';
12 sub PSGI_KEY { 'Catalyst.Stash.v1' };
15 my ($self, $env) = @_;
16 $env->{&PSGI_KEY} = bless +{}, 'Catalyst::Stash';
20 my ($class, $env) = @_;
21 return $env->{&PSGI_KEY};
25 my ($self, $env) = @_;
26 $self->_init_stash($env);
27 return $self->app->($env);
32 Catalyst::Middleware::Stash - The Catalyst stash - in middleware
36 We've moved the L<Catalyst> stash to middleware. Please don't use this
37 directly since it is likely to move off the Catalyst namespace into a stand
42 This class defines the following methods
46 Returns the hash key where we store the stash
50 Get the stash out of the C<$env>
54 Used by plack to call the middleware