diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-10-05 18:30:32 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-10-05 18:30:32 -0500 |
commit | 6ff12b877afbda62ad2cb6d748487e7674e5c396 (patch) | |
tree | 74fa460cfbb35ff23603a8ee4e3a84c7d2dda52b /lib/Text/Handlebars | |
parent | f805baad91b66f47885160afaed141a4e4c5fa67 (diff) | |
download | text-handlebars-6ff12b877afbda62ad2cb6d748487e7674e5c396.tar.gz text-handlebars-6ff12b877afbda62ad2cb6d748487e7674e5c396.zip |
change back to defining helpers and functions separately
helpers are different from functions because they implicitly receive the
current context as the first argument, so they need to be declared
differently. they work identically to functions in all other respects.
Diffstat (limited to 'lib/Text/Handlebars')
-rw-r--r-- | lib/Text/Handlebars/Compiler.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Text/Handlebars/Compiler.pm b/lib/Text/Handlebars/Compiler.pm index ae1738b..184b9b6 100644 --- a/lib/Text/Handlebars/Compiler.pm +++ b/lib/Text/Handlebars/Compiler.pm @@ -9,6 +9,8 @@ has '+syntax' => ( default => 'Handlebars', ); +sub define_helper { shift->parser->define_helper(@_) } + sub _generate_block { my $self = shift; my ($node) = @_; |