while (*arg && (filter = ap_getword(parms->pool, &arg, ';'))) { modperl_cmd_push_httpd_filter_handlers( &(dcfg->handlers_per_dir[MP_OUTPUT_FILTER_HANDLER]), filter, parms->pool);
MP_CHECK_SERVER_OR_HTACCESS_CONTEXT;   modperl_run();  if (modperl_init_vhost(s, p, NULL) != OK) { return "init mod_perl vhost failed"; }  MP_PERL_OVERRIDE_CONTEXT;   if ((options = directive->data)) { const char *pkg_namespace; const char *pkg_base; const char *handler_name; const char *line_header;  if (!(handler_name = apr_table_get(options, "handler"))) { handler_name = apr_pstrdup(p, MP_DEFAULT_PERLSECTION_HANDLER); apr_table_set(options, "handler", handler_name); }  handler = modperl_handler_new(p, handler_name);  if (!(pkg_base = apr_table_get(options, "package"))) { pkg_base = apr_pstrdup(p, MP_DEFAULT_PERLSECTION_PACKAGE); }  pkg_namespace = modperl_file2package(p, directive->filename);  pkg_name = apr_psprintf(p, "%s::%s::line_%d", pkg_base, pkg_namespace, directive->line_num);  apr_table_set(options, "package", pkg_name);  line_header = apr_psprintf(p, "\n#line %d %s\n", directive->line_num, directive->filename);   arg = apr_pstrcat(p, "package ", pkg_name, ";", line_header, arg, NULL); }  { GV *gv = gv_fetchpv("0", TRUE, SVt_PV); ENTER;SAVETMPS; save_scalar(gv);  sv_setpv_mg(GvSV(gv), directive->filename); eval_pv(arg, FALSE); FREETMPS;LEAVE; }  if (SvTRUE(ERRSV)) { MP_PERL_RESTORE_CONTEXT; return SvPVX(ERRSV); }  if (handler) { int status; SV *saveconfig = MP_PERLSECTIONS_SAVECONFIG_SV; AV *args = Nullav;  modperl_handler_make_args(aTHX_ &args, "Apache::CmdParms", parms, "APR::Table", options, NULL);  status = modperl_callback(aTHX_ handler, p, NULL, s, args);  SvREFCNT_dec((SV*)args);  if (!(saveconfig && SvTRUE(saveconfig))) { modperl_package_unload(aTHX_ pkg_name); }  if (status != OK) { char *error = SvTRUE(ERRSV) ? SvPVX(ERRSV) : apr_psprintf(p, "<Perl> handler %s failed with status=%d", handler->name, status); MP_PERL_RESTORE_CONTEXT; return error; }
MP_CMD_SRV_DECLARE(set_output_filter){    MP_dSCFG(parms->server);    modperl_config_dir_t *dcfg = (modperl_config_dir_t *)mconfig;    char *filter;        if (!MpSrvENABLE(scfg)) {        return apr_pstrcat(parms->pool,                           "Perl is disabled for server ",                           parms->server->server_hostname, NULL);    }    if (!MpSrvINPUT_FILTER(scfg)) {        return apr_pstrcat(parms->pool,                           "PerlSetOutputFilter is disabled for server ",                           parms->server->server_hostname, NULL);    }    while (*arg && (filter = ap_getword(parms->pool, &arg, ';'))) {        modperl_cmd_push_httpd_filter_handlers(            &(dcfg->handlers_per_dir[MP_OUTPUT_FILTER_HANDLER]),            filter, parms->pool);    }    return NULL;}