Skip to content

Commit

Permalink
generated helpers can be cached
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 10, 2014
1 parent dfabeeb commit 121f050
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Mojolicious/Renderer.pm
Expand Up @@ -76,8 +76,8 @@ sub get_helper {
my $lookup = $self->{lookup} ||= {};
return undef
unless $lookup->{$name} || grep {/^\Q$name\E\./} keys %{$self->helpers};
$lookup->{$name} ||= 1;
return sub { Mojolicious::Renderer::_Proxy->new(c => shift, p => $name) };
return $lookup->{$name}
||= sub { Mojolicious::Renderer::_Proxy->new(c => shift, p => $name) };
}

sub render {
Expand Down

0 comments on commit 121f050

Please sign in to comment.