Open
Description
Sorry, I couldn't work out whether the bug is in Dancer2 or Template Toolkit. Any idea how to test Template Toolkit independently?
Context
Template-Toolkit-3.101
Dancer2-1.1.0
Perl v5.36.0
Code to replicate the issue
#!/usr/bin/perl
use Dancer2;
set template => 'template_toolkit';
get '/foo' => sub {
return forward '/bar';
};
get '/bar' => sub {
return 'Hello, World!';
};
dance;
To demonstrate the bug
curl http://localhost:3000/foo
and this is what appears in the logs:
>> Dancer2 v1.1.0 server 19422 listening on http://0.0.0.0:3000
[main:19422] debug @2024-02-14 20:04:23> bless( ['file','404.tt: not found',undef], 'Template::Exception' ) in /usr/local/share/perl/5.36.0/Dancer2/Core/Error.pm l. 73
To dodge the bug
Just comment out this line:
set template => 'template_toolkit';