Skip to content

Commit

Permalink
small optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 3, 2014
1 parent baf84d8 commit d13ca2c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/Mojolicious/Plugin/TagHelpers.pm
Expand Up @@ -45,7 +45,7 @@ sub register {

sub _csrf_field {
my $self = shift;
return $self->hidden_field(csrf_token => $self->csrf_token, @_);
return _hidden_field($self, csrf_token => $self->csrf_token, @_);
}

sub _form_for {
Expand All @@ -68,8 +68,7 @@ sub _form_for {

sub _hidden_field {
my $self = shift;
my %attrs = (name => shift, value => shift, @_, type => 'hidden');
return _tag('input', %attrs);
return _tag('input', name => shift, value => shift, @_, type => 'hidden');
}

sub _input {
Expand Down

0 comments on commit d13ca2c

Please sign in to comment.