diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-10-05 11:32:17 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-10-05 11:32:17 -0500 |
commit | e569779e3be9ec0fbdae803c1fe381d6ebf65bd3 (patch) | |
tree | 598c908aad694a34aa54425c8a0ef4b0d0fc3916 /lib/Text/Handlebars.pm | |
parent | ff63679a7ff342532d5a28f43eef255fc5c3daf0 (diff) | |
download | text-handlebars-e569779e3be9ec0fbdae803c1fe381d6ebf65bd3.tar.gz text-handlebars-e569779e3be9ec0fbdae803c1fe381d6ebf65bd3.zip |
support {{this/foo}}
Diffstat (limited to 'lib/Text/Handlebars.pm')
-rw-r--r-- | lib/Text/Handlebars.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Text/Handlebars.pm b/lib/Text/Handlebars.pm index 914081f..bbc53a9 100644 --- a/lib/Text/Handlebars.pm +++ b/lib/Text/Handlebars.pm @@ -35,8 +35,8 @@ sub default_functions { die "no iterator cycle provided?" unless defined $i; - $value = ref($value->[$i]) - ? $value->[$i] + $value = ref($value->[$i]) && ref($value->[$i]) eq 'HASH' + ? { '.' => $value->[$i], %{ $value->[$i] } } : { '.' => $value->[$i] }; $ref = ref($value); |