Skip to content

Commit

Permalink
fix bug where inline was not considered a reserved stash value
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed May 11, 2015
1 parent c8654b4 commit 77da896
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Changes
@@ -1,7 +1,8 @@

6.11 2015-05-11
6.11 2015-05-12
- Updated jQuery to version 2.1.4.
- Fixed indentation of ASCII art in documentation browser. (jberger)
- Fixed bug where inline was not considered a reserved stash value.

6.10 2015-04-26
- Removed support for user/group switching, because it never worked
Expand Down
8 changes: 4 additions & 4 deletions lib/Mojolicious/Controller.pm
Expand Up @@ -16,7 +16,7 @@ has match =>

# Reserved stash values
my %RESERVED = map { $_ => 1 } (
qw(action app cb controller data extends format handler json layout),
qw(action app cb controller data extends format handler inline json layout),
qw(namespace path status template text variant)
);

Expand Down Expand Up @@ -869,9 +869,9 @@ Non-persistent data storage and exchange for the current request, application
wide default values can be set with L<Mojolicious/"defaults">. Some stash
values have a special meaning and are reserved, the full list is currently
C<action>, C<app>, C<cb>, C<controller>, C<data>, C<extends>, C<format>,
C<handler>, C<json>, C<layout>, C<namespace>, C<path>, C<status>, C<template>,
C<text> and C<variant>. Note that all stash values with a C<mojo.*> prefix are
reserved for internal use.
C<handler>, C<inline>, C<json>, C<layout>, C<namespace>, C<path>, C<status>,
C<template>, C<text> and C<variant>. Note that all stash values with a
C<mojo.*> prefix are reserved for internal use.
# Remove value
my $foo = delete $c->stash->{foo};
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Guides/Rendering.pod
Expand Up @@ -243,7 +243,7 @@ correct name actually exists and falls back to the generic one otherwise.

=head2 Rendering inline templates

Some renderers such as C<ep> allow templates to be passed inline.
Some renderers such as C<ep> allow templates to be passed C<inline>.

$c->render(inline => 'The result is <%= 1 + 1 %>.');

Expand Down
1 change: 1 addition & 0 deletions t/mojolicious/dispatch.t
Expand Up @@ -94,6 +94,7 @@ is $c->param(data => 'test')->param('data'), undef, 'value is reserved';
is $c->param(extends => 'test')->param('extends'), undef, 'value is reserved';
is $c->param(format => 'test')->param('format'), undef, 'value is reserved';
is $c->param(handler => 'test')->param('handler'), undef, 'value is reserved';
is $c->param(inline => 'test')->param('inline'), undef, 'value is reserved';
is $c->param(json => 'test')->param('json'), undef, 'value is reserved';
is $c->param(layout => 'test')->param('layout'), undef, 'value is reserved';
is $c->param(namespace => 'test')->param('namespace'), undef,
Expand Down

0 comments on commit 77da896

Please sign in to comment.