Skip to content
Browse files

small optimizations

  • Loading branch information...
1 parent 590c055 commit 423c0e5593ef54503e6d3a5d4239d974bfc1f2bf @kraih kraih committed Aug 28, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/Mojolicious/Plugin/DefaultHelpers.pm
View
6 lib/Mojolicious/Plugin/DefaultHelpers.pm
@@ -89,8 +89,7 @@ sub _content {
my $content = pop;
# Set
- my $stash = $self->stash;
- my $c = $stash->{'mojo.content'} ||= {};
+ my $c = $self->stash->{'mojo.content'} ||= {};
if (defined $content) {
# Reset with multiple values
@@ -104,8 +103,7 @@ sub _content {
}
# Get
- $content = $c->{$name} // '';
- return Mojo::ByteStream->new("$content");
+ return Mojo::ByteStream->new($c->{$name} // '');
}
sub _content_for {

0 comments on commit 423c0e5

Please sign in to comment.
Something went wrong with that request. Please try again.