Skip to content

Commit

Permalink
a few more small optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed May 13, 2013
1 parent d5452f4 commit a490003
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

4.0 2013-05-12
4.0 2013-05-13
- Code name "Top Hat", this is a major release.
- Added simple JSON serialization support to Mojo::Transaction::WebSocket.
- Added json event to Mojo::Transaction::WebSocket.
Expand Down
8 changes: 3 additions & 5 deletions lib/Mojolicious/Plugin/DefaultHelpers.pm
Expand Up @@ -16,11 +16,9 @@ sub register {
for my $name (qw(extends layout title)) {
$app->helper(
$name => sub {
my $self = shift;
my $stash = $self->stash;
$stash->{$name} = shift if @_;
$self->stash(@_) if @_;
return $stash->{$name};
my $self = shift;
$self->stash($name => @_) if @_;
return $self->stash->{$name};
}
);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojolicious/Plugin/TagHelpers.pm
@@ -1,7 +1,7 @@
package Mojolicious::Plugin::TagHelpers;
use Mojo::Base 'Mojolicious::Plugin';

use Mojo::ByteStream 'b';
use Mojo::ByteStream;
use Mojo::Util 'xml_escape';

sub register {
Expand Down Expand Up @@ -212,7 +212,7 @@ sub _tag {
else { $tag .= ' />' }

# Prevent escaping
return b($tag);
return Mojo::ByteStream->new($tag);
}

sub _text_area {
Expand Down

0 comments on commit a490003

Please sign in to comment.