From a51757076642700537944f970c9274ceb65cf77d Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 5 Oct 2012 10:49:06 -0500 Subject: simplify --- lib/Text/Handlebars.pm | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/Text/Handlebars.pm b/lib/Text/Handlebars.pm index b756c04..914081f 100644 --- a/lib/Text/Handlebars.pm +++ b/lib/Text/Handlebars.pm @@ -72,13 +72,7 @@ sub options { }, each => sub { my ($context, $list, $options) = @_; - - my $ret = ''; - for my $new_context (@$list) { - $ret .= $options->{fn}->($new_context); - } - - return $ret; + return join '', map { $options->{fn}->($_) } @$list; }, if => sub { my ($context, $conditional, $options) = @_; -- cgit v1.2.3