It would be nice to have shebang configs in nginx.
If config file have shebang string, then nginx run this config through corresponding interpeter and read real config from stdout.
For example:
/usr/local/sbin/nginx -c nginx.conf
nginx.conf content:
#!/usr/bin/perl
print "
worker_processes 1;
pcre_jit on;
events {
worker_connections 1024;
}
etc...
";
1;
This should be work with config files, used by include directive also.