Skip to content

Commit

Permalink
small optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Nov 12, 2012
1 parent 99b1521 commit 45af12e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Changes
@@ -1,7 +1,8 @@

3.57 2012-11-12
- Deprecated Mojo::Exception->raw_message.
- Improved error message accuracy in Mojo::Template by using line diretives.
- Improved error message accuracy in Mojo::Template by using line
directives.
- Improved performance of contains method in Mojo::Asset::File by 100%.
- Improved tests.
- Fixed range bug in Mojo::Asset::Memory.
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojo/Exception.pm
Expand Up @@ -117,8 +117,7 @@ sub _detect {

# More context
return $self unless my $files = shift;
my @lines = map { [split /\n/] } @$files;
$self->_context($trace[0][1], \@lines) if $trace[0][1];
$self->_context($trace[0][1], [map { [split /\n/] } @$files]);

return $self;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/Template.pm
Expand Up @@ -100,7 +100,7 @@ sub build {
sub compile {
my $self = shift;

# Compile with line directives
# Compile with line directive
return undef unless my $code = $self->code;
my $compiled = eval qq{#line 1 "@{[$self->name]}"\n} . $code;
$self->compiled($compiled) and return undef unless $@;
Expand Down

0 comments on commit 45af12e

Please sign in to comment.