Open rmesser opened 7 years ago
Hi @rmesser, are you using this lib in production?
Hi. We were using it for a while in production because we want to share templates between perl and javascript. But there were enough differences that it was difficult, so we switched to using more standard Text::Xslate on the back-end (perl) side. Regards,
Rob
On Aug 18, 2017, at 3:49 PM, amit777 notifications@github.com wrote:
Hi @rmesser https://github.com/rmesser, are you using this lib in production?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/doy/text-handlebars/issues/9#issuecomment-323477450, or mute the thread https://github.com/notifications/unsubscribe-auth/ABwSpAxkqGMgYi-YDBG4OlEUVCLhWkZ8ks5sZhTvgaJpZM4LSNYh.
@rmesser , thanks Rob. We are looking to do the same exact thing. If you are using Text::Xslate in perl, what are you doing on the javascript side? I'm also considering just creating an nodejs for the perl code to call.
@amit777, we went the other way and just let the front-end do a server-side call (via a websocket, but it could be ajax) to apply the data to the template. But yea I suppose you could let perl call nodejs to run some javascript and handle the template that way.
On Aug 18, 2017, at 4:22 PM, amit777 notifications@github.com wrote:
@rmesser https://github.com/rmesser , thanks Rob. We are looking to do the same exact thing. If you are using Text::Xslate in perl, what are you doing on the javascript side? I'm also considering just creating an nodejs for the perl code to call.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/doy/text-handlebars/issues/9#issuecomment-323481553, or mute the thread https://github.com/notifications/unsubscribe-auth/ABwSpKTH3RB17a5N7mPhVamEU5zSenGwks5sZhyrgaJpZM4LSNYh.
"each" does not process hashes. For example, this test fails:
The error is: Text::Handlebars: Not an ARRAY reference at /home/intellisurvey/versions/7.0/isapps/lib/perl5/site_perl/5.22.1/Text/Handlebars.pm line 24.
This template does work on the javascript version, as tested on http://tryhandlebarsjs.com/.
This patch fixes the problem, and makes the above test pass, without causing any other failures: