Skip to content

Commit

Permalink
more consistent method names
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 7, 2016
1 parent d962856 commit cf16599
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/Mojo/Template.pm
Expand Up @@ -159,10 +159,11 @@ sub parse {
sub process {
my $self = shift;

# Use local stack trace for compile exceptions
# Use a local stack trace for compile exceptions
my $compiled = $self->compiled;
unless ($compiled) {
my $code = $self->_build->code;
my $code = $self->_compile->code;
monkey_patch $self->namespace, '_escape', $self->escape;
return Mojo::Exception->new($@)->inspect($self->unparsed, $code)
->trace->verbose(1)
unless $compiled = eval $self->_wrap($code, @_);
Expand Down Expand Up @@ -194,7 +195,7 @@ sub render_file {
return $self->render($template, @_);
}

sub _build {
sub _compile {
my $self = shift;

my $tree = $self->tree;
Expand Down Expand Up @@ -276,9 +277,6 @@ sub _trim {
sub _wrap {
my ($self, $body, $vars) = @_;

# Escape function
monkey_patch $self->namespace, '_escape', $self->escape;

# Variables
my $args = '';
if ($self->vars && (my @vars = grep {/^\w+$/} keys %$vars)) {
Expand Down

0 comments on commit cf16599

Please sign in to comment.