Skip to content

Commit

Permalink
small optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 27, 2012
1 parent 590c055 commit 423c0e5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/Mojolicious/Plugin/DefaultHelpers.pm
Expand Up @@ -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
Expand All @@ -104,8 +103,7 @@ sub _content {
}

# Get
$content = $c->{$name} // '';
return Mojo::ByteStream->new("$content");
return Mojo::ByteStream->new($c->{$name} // '');
}

sub _content_for {
Expand Down

0 comments on commit 423c0e5

Please sign in to comment.