summaryrefslogtreecommitdiffstats
path: root/t/helpers-examples.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-10-05 18:30:32 -0500
committerJesse Luehrs <doy@tozt.net>2012-10-05 18:30:32 -0500
commit6ff12b877afbda62ad2cb6d748487e7674e5c396 (patch)
tree74fa460cfbb35ff23603a8ee4e3a84c7d2dda52b /t/helpers-examples.t
parentf805baad91b66f47885160afaed141a4e4c5fa67 (diff)
downloadtext-handlebars-6ff12b877afbda62ad2cb6d748487e7674e5c396.tar.gz
text-handlebars-6ff12b877afbda62ad2cb6d748487e7674e5c396.zip
change back to defining helpers and functions separately
helpers are different from functions because they implicitly receive the current context as the first argument, so they need to be declared differently. they work identically to functions in all other respects.
Diffstat (limited to 't/helpers-examples.t')
-rw-r--r--t/helpers-examples.t4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/helpers-examples.t b/t/helpers-examples.t
index 1df8e99..8f5a2fc 100644
--- a/t/helpers-examples.t
+++ b/t/helpers-examples.t
@@ -9,7 +9,7 @@ use Text::Xslate 'mark_raw';
render_ok(
{
- function => {
+ helpers => {
fullName => sub {
my ($context, $person) = @_;
return $person->{firstName} . ' ' . $person->{lastName};
@@ -55,7 +55,7 @@ RENDERED
render_ok(
{
- function => {
+ helpers => {
agree_button => sub {
my ($context) = @_;
return mark_raw(