SV* status_sv = POPs; if (SvIOK(status_sv)) { status = (IV)SvIVx(status_sv);
status_sv = POPs;  if (status_sv == &PL_sv_undef) {  status = OK;
int modperl_callback(pTHX_ modperl_handler_t *handler, apr_pool_t *p,                     request_rec *r, server_rec *s, AV *args){    CV *cv=Nullcv;    I32 flags = G_EVAL|G_SCALAR;    dSP;    int count, status = OK;    if ((status = modperl_handler_resolve(aTHX_ &handler, p, s)) != OK) {        return status;    }    ENTER;SAVETMPS;    PUSHMARK(SP);    if (MpHandlerMETHOD(handler)) {        GV *gv;        if (!handler->mgv_obj) {            Perl_croak(aTHX_ "panic: %s method handler object is NULL!",                       handler->name);        }        gv = modperl_mgv_lookup(aTHX_ handler->mgv_obj);        XPUSHs(modperl_mgv_sv(gv));    }    if (args) {        I32 items = AvFILLp(args) + 1;        EXTEND(SP, items);        Copy(AvARRAY(args), SP + 1, items, SV*);        SP += items;    }    PUTBACK;    if (MpHandlerANON(handler)) {        SV *sv = eval_pv(handler->name, TRUE); /* XXX: cache */        cv = (CV*)SvRV(sv);    }    else {        GV *gv = modperl_mgv_lookup_autoload(aTHX_ handler->mgv_cv, s, p);        if (gv) {            cv = modperl_mgv_cv(gv);        }        else {                        const char *name;            modperl_mgv_t *symbol = handler->mgv_cv;                         /* XXX: need to validate *symbol */            if (symbol && symbol->name) {                name = modperl_mgv_as_string(aTHX_ symbol, p, 0);            }            else {                name = handler->name;            }                        MP_TRACE_h(MP_FUNC, "[%s %s] lookup of %s failed\n",                         modperl_pid_tid(p), modperl_server_desc(s, p), name);            ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,                         "lookup of '%s' failed\n", name);            status = HTTP_INTERNAL_SERVER_ERROR;        }    }    if (status == OK) {        count = call_sv((SV*)cv, flags);        SPAGAIN;        if (count != 1) {            status = OK;        }        else {            SV* status_sv = POPs;            if (SvIOK(status_sv)) {                status = (IV)SvIVx(status_sv);            }            else {                /* ModPerl::Util::exit doesn't return an integer value */                status = OK;             }            /* assume OK for 200 (HTTP_OK) */            if ((status == 200)) {                status = OK;            }        }        PUTBACK;    }        FREETMPS;LEAVE;    if (SvTRUE(ERRSV)) {        MP_TRACE_h(MP_FUNC, "$@ = %s", SvPVX(ERRSV));        status = HTTP_INTERNAL_SERVER_ERROR;    }    return status;}