Skip to content

Commit

Permalink
mention that reusing templates is much better for performance
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 7, 2016
1 parent 69ae562 commit ddc627d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojo/Template.pm
Expand Up @@ -663,7 +663,7 @@ L<Mojo::Exception> object if rendering failed.
# Parse and process
say Mojo::Template->new->parse('Hello <%= $_[0] %>')->process('Bender');
# Reuse template
# Reuse template (for much better performance)
my $mt = Mojo::Template->new;
say $mt->render('Hello <%= $_[0] %>!', 'Bender');
say $mt->process('Fry');
Expand Down

0 comments on commit ddc627d

Please sign in to comment.