From 1bd9194b87f14c81133a8d1a4d17ca02d787dc5c Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 14 Oct 2012 13:23:55 -0500 Subject: neither does make_hash --- lib/Text/Handlebars/Compiler.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/Text/Handlebars/Compiler.pm') diff --git a/lib/Text/Handlebars/Compiler.pm b/lib/Text/Handlebars/Compiler.pm index d713fc1..48844d1 100644 --- a/lib/Text/Handlebars/Compiler.pm +++ b/lib/Text/Handlebars/Compiler.pm @@ -57,7 +57,7 @@ sub _generate_call { } } - my $hash = $self->call($node, '(make_hash)', @hash); + my $hash = $self->make_hash(@hash); unshift @args, $self->vars; @@ -287,6 +287,16 @@ sub make_array { ); } +sub make_hash { + my $self = shift; + my (@contents) = @_; + + return $self->parser->symbol('{')->clone( + arity => 'composer', + first => \@contents, + ); +} + __PACKAGE__->meta->make_immutable; no Any::Moose; -- cgit v1.2.3-54-g00ecf