if ((my_perl = perl_alloc()) == NULL) { perror("Failed to create interpreter"); return 2; } perl_construct(my_perl); /* Run the startup script */ startup[0] = soapGlobals.service; startup[1] = soapGlobals.config; if (perl_parse(my_perl, xs_init, NumberOf(startup), startup, NULL) != 0) { perror ("Failed to parse startup file"); return 3; } /* Define the proper exit flags */ #ifdef PERL_EXIT_DESTRUCT_END PL_exit_flags |= PERL_EXIT_DESTRUCT_END; #endif /* Run the interpreter */ if (perl_run(my_perl) != 0) { perror ("Failed to run interpreter"); return 3; }