Subject: | delayed() fails when send_file() called within |
As the subject says, delayed() will fail when send_file() is called within. Dancer2::Core::App will fail like so:
Can't call method "env" on an undefined value at /usr/local/share/perl/5.18.2/Dancer2/Core/App.pm line 883.
The smallest code to reproduce the failure:
get '/foo' => sub {
delayed {
send_file 'bar.txt';
};
};
Discovered this in Dancer2 0.162000.