10 Apr
2017
10 Apr
'17
10:42 a.m.
On 10. april 2017 10:39, Julian Maurice wrote:
I need to execute code at the beginning of every request. For now it's in a BEGIN block. It works well in CGI mode, but not at all with plack (it's only executed once). I tried moving the BEGIN block into a sub init(), calling this sub in the BEGIN block and in the PSGI file (in CGI::new wrapper). It works but it doesn't feel "right".
probably the best way in plack is to "enable" it in the build chain, like it is happening with Koha::Middleware::SetEnv in plack.psgi HTH F