This is not very cool, as maybe there are other template engines, maybe faster or lighter or just different than mustache, but it gives us zero options other than this one.
One could add yet another named parameter to specify the engine, but first very coupled mustache bits should be separated into "default" implementation.
Totally right.
Probably the best thing would be to spin off a role and use dependency injection for this. I personally like Template::Classic, for instance.
Right now the HTML rendered is pushed into a template using this:
This is not very cool, as maybe there are other template engines, maybe faster or lighter or just different than mustache, but it gives us zero options other than this one.
One could add yet another named parameter to specify the engine, but first very coupled mustache bits should be separated into "default" implementation.