Dancer
Dancer copied to clipboard
template failing with relative path for view in tests
Hi, I think that this says pretty much what I'm after: https://gist.github.com/1105421
It stopped working with the latest stable release (1.3070). It seems that the workaround is to set an absolute path for the 'view' setting, but I think it shouldn't.
When I tried to track the problem down, I ended up discovering that both the view() method and Template::Toolkit try to prepend the path, i.e. Template::Toolkit complains that it can't find t/views/t/views/root.tt. Either view() should pass the name, or it should set an absolute path to the file to make TT2 happy.
Cheers,
Flavio.
Just wanted to apologise that this issue hasn't been dealt with yet; thank you for the report and the test case.
I plan to investigate this one more within the next few days and get to the bottom of it - the behaviour should not have changed in 1.3070 as far as I'm aware.
I think that non-absolute paths provided to the views
setting should be treated as relative to the appdir.
I just noticed after commenting that @xsawyerx is assigned to this one, so I'll liaise with him.