diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-10-05 10:49:06 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-10-05 10:51:11 -0500 |
commit | a51757076642700537944f970c9274ceb65cf77d (patch) | |
tree | 0b6eba75b526cfa54fd95e475f8e979030195e60 /lib/Text | |
parent | 976cd7bfe58d2e18dad08fbe201cb8f4f78d4769 (diff) | |
download | text-handlebars-a51757076642700537944f970c9274ceb65cf77d.tar.gz text-handlebars-a51757076642700537944f970c9274ceb65cf77d.zip |
simplify
Diffstat (limited to 'lib/Text')
-rw-r--r-- | lib/Text/Handlebars.pm | 8 |
1 files changed, 1 insertions, 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) = @_; |