Hello.

I'm trying to pair Template::Provider::FromDATA with Dancer to have self-contained dancer app. The repository is at https://github.com/JochenLutz/Dancer (branch pr/TemplateFromDATA). It works (but is still missing the POD).

But: It breaks the test case t/01_config/06_stack_trace.t, and I think
it's rather a bug in the test case - or me misinterpreting the documentation - than a bug in my changes.

t/01_config/06_stack_trace.t calls
| Dancer::Template::TemplateToolkit->render('/not/a/valid/file');
but according to Dancer::Template::Abstract, it's
| render($self, $template, $tokens)
so the first parameter should be an object of the class Dancer::Template::Abstract (or any of its children), not the string "Dancer::Template::TemplateToolkit". Or, if render() is meant to be called as a class method, I think this should be documented.

I grepped through the whole source tree, this test case is the only place where Dancer::Template::TemplateToolkit::render() is called as a class method.

Any suggestions how to handle this? Should I just change the test case or should I change my changes to Dancer::Template::TemplateToolkit::render() to accept being called as a class method?


Regards,
  Jochen
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to