diff --git a/plugins/psgi/psgi.h b/plugins/psgi/psgi.h index 873bfaba..093747ba 100644 --- a/plugins/psgi/psgi.h +++ b/plugins/psgi/psgi.h @@ -28,6 +28,9 @@ struct uwsgi_perl { int no_die_catch; int stacktrace_available; + char *argv_items; + struct uwsgi_string_list *argv_item; + // this is a pointer to the main list of interpreters (required for signals, rpc....); PerlInterpreter **main; diff --git a/plugins/psgi/psgi_plugin.c b/plugins/psgi/psgi_plugin.c index d90b4a84..832c659d 100644 --- a/plugins/psgi/psgi_plugin.c +++ b/plugins/psgi/psgi_plugin.c @@ -19,6 +19,8 @@ struct uwsgi_option uwsgi_perl_options[] = { #ifdef PERL_VERSION_STRING {"perl-version", no_argument, 0, "print perl version", uwsgi_opt_print, PERL_VERSION_STRING, UWSGI_OPT_IMMEDIATE}, #endif + {"perl-args", required_argument, 0, "add items (space separated) to @ARGV", uwsgi_opt_set_str, &uperl.argv_items, 0}, + {"perl-arg", required_argument, 0, "add an item to @ARGV", uwsgi_opt_add_string_list, &uperl.argv_item, 0}, {0, 0, 0, 0, 0, 0, 0}, };