Skip to content

Commit

Permalink
better description for process method
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 7, 2016
1 parent 5009417 commit 69ae562
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/Mojo/Template.pm
Expand Up @@ -657,10 +657,14 @@ Parse template into L</"tree">.
my $output = $mt->process(@args);
my $output = $mt->process({foo => 'bar'});
Process template code and return the result, or a L<Mojo::Exception> object if
rendering failed.
Process previously parsed template and return the result, or a
L<Mojo::Exception> object if rendering failed.
# Parse and process
say Mojo::Template->new->parse('Hello <%= $_[0] %>')->process('Bender');
# Reuse template
my $mt = Mojo::Template->new;
say $mt->render('Hello <%= $_[0] %>!', 'Bender');
say $mt->process('Fry');
say $mt->process('Leela');
Expand Down

0 comments on commit 69ae562

Please sign in to comment.