if (MpDirSETUP_ENV(dcfg) || !MpDirSeenSETUP_ENV(dcfg)) { modperl_env_request_populate(aTHX_ r); }
int modperl_response_handler_cgi(request_rec *r){    MP_dDCFG;    MP_dRCFG;    GV *h_stdin, *h_stdout;    int retval;#ifdef USE_ITHREADS    pTHX;    modperl_interp_t *interp;#endif    if (!strEQ(r->handler, "perl-script")) {        return DECLINED;    }#ifdef USE_ITHREADS    interp = modperl_interp_select(r, r->connection, r->server);    aTHX = interp->perl;    if (MpInterpPUTBACK(interp)) {        rcfg->interp = interp;    }#endif    if (MpDirPARSE_HEADERS(dcfg)) {        rcfg->wbucket.header_parse = 1;    }    modperl_perl_global_save(aTHX_ &rcfg->perl_globals);    h_stdout = modperl_io_tie_stdout(aTHX_ r);    h_stdin  = modperl_io_tie_stdin(aTHX_ r);    modperl_env_request_tie(aTHX_ r);    retval = modperl_response_handler_run(r, FALSE);    modperl_io_handle_untie(aTHX_ h_stdout);    modperl_io_handle_untie(aTHX_ h_stdin);    modperl_env_request_untie(aTHX_ r);    modperl_perl_global_restore(aTHX_ &rcfg->perl_globals);#ifdef USE_ITHREADS    if (MpInterpPUTBACK(interp)) {        /* PerlInterpScope handler */        modperl_interp_unselect(interp);        rcfg->interp = NULL;    }#endif    /* flush output buffer after interpreter is putback */    modperl_response_finish(r);    return retval;}