diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-10-04 16:12:59 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-10-04 16:12:59 -0500 |
commit | bbe57bfb5c3e41c74ca72ae971593ff3a5dbfce5 (patch) | |
tree | 73050f229d71eaa4e61fd86b1664ce619cd0ee4a /lib/Text/Handlebars.pm | |
parent | 3cb2968e248cca93ab6e62e02fa733e8d7d26887 (diff) | |
download | text-handlebars-bbe57bfb5c3e41c74ca72ae971593ff3a5dbfce5.tar.gz text-handlebars-bbe57bfb5c3e41c74ca72ae971593ff3a5dbfce5.zip |
make this a bit clearer
Diffstat (limited to 'lib/Text/Handlebars.pm')
-rw-r--r-- | lib/Text/Handlebars.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Text/Handlebars.pm b/lib/Text/Handlebars.pm index fd3fc28..44d8174 100644 --- a/lib/Text/Handlebars.pm +++ b/lib/Text/Handlebars.pm @@ -93,13 +93,13 @@ sub _register_builtin_methods { for my $helper (keys %{ $self->{helpers} }) { my $code = $self->{helpers}{$helper}; $funcs->{$helper} = sub { - my ($raw_text, @args) = @_; + my ($raw_text, $vars, @args) = @_; my $recurse = sub { - my ($vars) = @_; - return $weakself->render_string($raw_text, $vars); + my ($new_vars) = @_; + return $weakself->render_string($raw_text, $new_vars); }; - return $code->(@args, { fn => $recurse }); + return $code->($vars, @args, { fn => $recurse }); } } } |