Skip to content

Commit

Permalink
put return value into the correct scope
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 3, 2014
1 parent e9e2052 commit 895cb87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojo/Template.pm
Expand Up @@ -275,7 +275,7 @@ sub _wrap {
my $head = $self->_line(1);
$head .= "\npackage @{[$self->namespace]}; use Mojo::Base -strict;";
$code = "$head sub { my \$_M = ''; @{[$self->prepend]}; { $code\n";
$code .= $self->_line($num + 1) . "\n@{[$self->append]}; \$_M } };";
$code .= $self->_line($num + 1) . "\n@{[$self->append]}; } \$_M };";

warn "-- Code for @{[$self->name]}\n@{[encode 'UTF-8', $code]}\n\n" if DEBUG;
return $code;
Expand Down

0 comments on commit 895cb87

Please sign in to comment.