From 6ff12b877afbda62ad2cb6d748487e7674e5c396 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 5 Oct 2012 18:30:32 -0500 Subject: 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. --- lib/Text/Handlebars/Compiler.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/Text/Handlebars/Compiler.pm') 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) = @_; -- cgit v1.2.3-54-g00ecf