summaryrefslogtreecommitdiffstats
path: root/lib/Text/Handlebars.pm
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-10-08 15:21:08 -0500
committerJesse Luehrs <doy@tozt.net>2012-10-08 15:21:08 -0500
commit2fc8a855e6e6a8dc2d43f959e9c5ecd2ae9ea4c8 (patch)
treea184b9702409656a98ae3e0ff43eeab88f57c729 /lib/Text/Handlebars.pm
parent0a45bee673aa48c56607eb7f5f06c7a4b6bbca03 (diff)
downloadtext-handlebars-2fc8a855e6e6a8dc2d43f959e9c5ecd2ae9ea4c8.tar.gz
text-handlebars-2fc8a855e6e6a8dc2d43f959e9c5ecd2ae9ea4c8.zip
check partial suffix at runtime, not compile time
Diffstat (limited to 'lib/Text/Handlebars.pm')
-rw-r--r--lib/Text/Handlebars.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Text/Handlebars.pm b/lib/Text/Handlebars.pm
index f8d1692..ab76b42 100644
--- a/lib/Text/Handlebars.pm
+++ b/lib/Text/Handlebars.pm
@@ -120,9 +120,9 @@ sub _register_builtin_methods {
};
$funcs->{'(find_file)'} = sub {
my ($filename) = @_;
- return 1 if try { $weakself->find_file($filename); 1 };
+ return $filename if try { $weakself->find_file($filename); 1 };
$filename .= $weakself->{suffix};
- return 1 if try { $weakself->find_file($filename); 1 };
+ return $filename if try { $weakself->find_file($filename); 1 };
return 0;
};
$funcs->{'(make_block_helper)'} = sub {