Skip to content

Commit

Permalink
just pass along all arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 3, 2015
1 parent ce7c8fc commit 79dd4fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Mojolicious/Plugin/DefaultHelpers.pm
Expand Up @@ -25,9 +25,9 @@ sub register {
$app->helper(c => sub { shift; Mojo::Collection->new(@_) });
$app->helper(config => sub { shift->app->config(@_) });

$app->helper(content => sub { _content(shift, 0, 0, @_) });
$app->helper(content_for => sub { _content(shift, 1, 0, @_) });
$app->helper(content_with => sub { _content(shift, 0, 1, @_) });
$app->helper(content => sub { _content(0, 0, @_) });
$app->helper(content_for => sub { _content(1, 0, @_) });
$app->helper(content_with => sub { _content(0, 1, @_) });

$app->helper($_ => $self->can("_$_"))
for
Expand All @@ -53,7 +53,7 @@ sub _asset {
sub _block { ref $_[0] eq 'CODE' ? $_[0]() : $_[0] }

sub _content {
my ($c, $append, $replace, $name, $content) = @_;
my ($append, $replace, $c, $name, $content) = @_;
$name ||= 'content';

my $hash = $c->stash->{'mojo.content'} ||= {};
Expand Down

0 comments on commit 79dd4fd

Please sign in to comment.