Skip to content

Commit

Permalink
fixed small bug in Mojolicious::Plugin::EPRenderer that prevented cod…
Browse files Browse the repository at this point in the history
…e to be added to all templates
  • Loading branch information
kraih committed Jul 12, 2012
1 parent 694a3c9 commit e585f5d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Changes
@@ -1,4 +1,8 @@

3.07 2012-07-12
- Fixed small bug in Mojolicious::Plugin::EPRenderer that prevented code to
be added to all templates.

3.06 2012-07-11
- Added tls_verify option to Mojo::IOLoop::Server->listen. (scottw)
- Added verify parameter to Mojo::Server::Daemon->listen. (scottw)
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious.pm
Expand Up @@ -34,7 +34,7 @@ has static => sub { Mojolicious::Static->new };
has types => sub { Mojolicious::Types->new };

our $CODENAME = 'Rainbow';
our $VERSION = '3.06';
our $VERSION = '3.07';

# "These old doomsday devices are dangerously unstable.
# I'll rest easier not knowing where they are."
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojolicious/Plugin/EPRenderer.pm
Expand Up @@ -47,7 +47,7 @@ sub register {
for grep {/^\w+$/} keys %{$c->stash};

# Cache
$cache->set($key => $mt->prepend($prepend));
$cache->set($key => $mt->prepend($mt->prepend . $prepend));
}

# Render with "epl" handler
Expand Down
5 changes: 4 additions & 1 deletion t/mojolicious/twinkle_lite_app.t
Expand Up @@ -25,6 +25,7 @@ my $twinkle = {
escape_mark => '*',
expression_mark => '*',
line_start => '.',
prepend => 'no warnings "redefine"; sub bar { "bar!" }',
tag_end => '**',
tag_start => '**',
trim_mark => '*'
Expand Down Expand Up @@ -69,7 +70,8 @@ get '/dead' => sub {die};
my $t = Test::Mojo->new;

# GET /
$t->get_ok('/')->status_is(200)->content_like(qr/testHello <sebastian>!123/);
$t->get_ok('/')->status_is(200)
->content_like(qr/testHello <sebastian>!bar!123/);

# GET /advanced
$t->get_ok('/advanced')->status_is(200)
Expand Down Expand Up @@ -100,6 +102,7 @@ __DATA__
@@ index.foo.twinkle
. layout 'twinkle';
Hello *** $name **!\
*** bar **\
@@ layouts/twinkle.foo.ep
test<%= content %>123\
Expand Down

0 comments on commit e585f5d

Please sign in to comment.