diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-10-14 13:23:55 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-10-14 14:38:14 -0500 |
commit | 1bd9194b87f14c81133a8d1a4d17ca02d787dc5c (patch) | |
tree | 84dce8754463002bcc001a9473709a3dc4335adf /lib/Text/Handlebars/Compiler.pm | |
parent | 5170de4d15d7ff92f3c2a1897caa91928a8855ed (diff) | |
download | text-handlebars-1bd9194b87f14c81133a8d1a4d17ca02d787dc5c.tar.gz text-handlebars-1bd9194b87f14c81133a8d1a4d17ca02d787dc5c.zip |
neither does make_hash
Diffstat (limited to 'lib/Text/Handlebars/Compiler.pm')
-rw-r--r-- | lib/Text/Handlebars/Compiler.pm | 12 |
1 files changed, 11 insertions, 1 deletions
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; |