However I tried to add options (--single) to the dub shebang and
apache now throwing: "bad header error"
Without "--single" option seems to work.
#!/usr/bin/env -vS dub --single
/+ dub.sdl:
name "application"
dependency "arsd-official:dom" version="4.0.2"
+/
import std.stdio;
import arsd.dom;
void main()
{
writeln(`Content-type: text/html`);
writeln(``);
writeln(`test`);
}
split -S: 'dub --single'
into: 'dub'
& '--single'
executing: dub
arg[0]= 'dub'
arg[1]= '--single'
arg[2]= '/usr/lib/cgi-bin/example.d'
[Wed Jul 31 19:57:56.892522 2019] [cgid:error] [pid 833:tid
140583783876352] [client >127.0.0.1:43598] malformed header from
script 'example.d': Bad header: Performing "debug" >build using