Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render_file() method that just renders the darn file #6

Closed
abh opened this issue Sep 19, 2011 · 2 comments
Closed

render_file() method that just renders the darn file #6

abh opened this issue Sep 19, 2011 · 2 comments

Comments

@abh
Copy link

abh commented Sep 19, 2011

So far we've been using Template::Mustache with separate code that looks up the template data from an external source.

I needed it now to just read some files from disk and were surprised by the crazy (IMO) scheme to prefix the template names with the current class name. In just about any application I've ever worked on, templates have just been in one or more "simple" search paths -- not related to the module name -- and I've never seen an application where each "user of templates" would have its own template engine subclass.

I realize it makes sense to you; but it doesn't make any sense to me. :-) I considered briefly sending a patch, but this is so deeply ingrained in the current implementation that it's really for you to decide if it could be cleaned up to be simpler/more intuitive. Until then I'll just use Text::Caml in this particular application

@yanick
Copy link
Owner

yanick commented Jun 20, 2017

You'll be happy to hear that in the upcoming version of Template::Mustache, I've done away with the path munging. What you give to template_path is now what is being used, without further magic. :-)

@yanick
Copy link
Owner

yanick commented Jul 4, 2017

Published!

@yanick yanick closed this as completed Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants