summaryrefslogtreecommitdiffstats
path: root/lib/Text/Handlebars.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-10-24 18:00:21 -0500
committerJesse Luehrs <doy@tozt.net>2013-01-02 13:56:21 -0600
commit6f0daf7d3c5fa3311cb6c11257cb671981eadc3a (patch)
treefd1fe1e740a39e368ddcde2c045c2b55e20b11d0 /lib/Text/Handlebars.pm
parent32ec4a2cda7b608c8da3575318347c140a89c2f9 (diff)
downloadtext-handlebars-6f0daf7d3c5fa3311cb6c11257cb671981eadc3a.tar.gz
text-handlebars-6f0daf7d3c5fa3311cb6c11257cb671981eadc3a.zip
gfx doesn't want to support a render_string opcode
Diffstat (limited to 'lib/Text/Handlebars.pm')
-rw-r--r--lib/Text/Handlebars.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Text/Handlebars.pm b/lib/Text/Handlebars.pm
index 2bd0096..d4a3778 100644
--- a/lib/Text/Handlebars.pm
+++ b/lib/Text/Handlebars.pm
@@ -143,6 +143,10 @@ sub _register_builtin_methods {
my ($funcs) = @_;
weaken(my $weakself = $self);
+ $funcs->{'(render_string)'} = sub {
+ my ($to_render, $vars) = @_;
+ return $weakself->render_string($to_render, $vars);
+ };
$funcs->{'(make_block_helper)'} = sub {
my ($code, $raw_text, $else_raw_text, $hash) = @_;