Skip to content

Commit

Permalink
moved list of reserved stash values to Mojolicious::Controller
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 26, 2012
1 parent 49aa394 commit d19e30b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 5 additions & 1 deletion lib/Mojolicious/Controller.pm
Expand Up @@ -962,7 +962,11 @@ Cookies failing signature verification will be automatically discarded.
$c = $c->stash(foo => 'bar');
Non persistent data storage and exchange, application wide default values can
be set with L<Mojolicious/"defaults">.
be set with L<Mojolicious/"defaults">. Many stash value have a special
meaning and are reserved, the full list is currently C<action>, C<app>,
C<cb>, C<class>, C<controller>, C<data>, C<extends>, C<format>, C<handler>,
C<json>, C<layout>, C<method>, C<namespace>, C<partial>, C<path>, C<status>,
C<template> and C<text>.
$c->stash->{foo} = 'bar';
my $foo = $c->stash->{foo};
Expand Down
6 changes: 2 additions & 4 deletions lib/Mojolicious/Guides/Routing.pod
Expand Up @@ -215,10 +215,8 @@ at any time.
$self->stash(mymessage => 'Welcome');
}

The full list of all reserved stash values is currently C<action>, C<app>,
C<cb>, C<class>, C<controller>, C<data>, C<extends>, C<format>, C<handler>,
C<json>, C<layout>, C<method>, C<namespace>, C<partial>, C<path>, C<status>,
C<template> and C<text>.
For a full list of reserved stash values see
L<Mojolicious::Controller/"stash">.

=head2 Nested routes

Expand Down

0 comments on commit d19e30b

Please sign in to comment.