in reply to Re: reinitializing embedded perl interpreter: undefined subrouting called during global destruction
in thread reinitializing embedded perl interpreter: undefined subrouting called during global destruction
{ const char *args[] = { "", "-ew", "0" }; const char** aargs PERL_UNUSED_DECL = args; static int arg_count = sizeof args / sizeof *args; PERL_SYS_INIT(&arg_count, const_cast<char***>(&aargs)); my_perl = perl_alloc(); perl_construct(my_perl); perl_parse(my_perl, xs_init, arg_count, const_cast<char**>(args), NULL +); PL_exit_flags |= PERL_EXIT_DESTRUCT_END; } { perl_destruct(my_perl); perl_free(my_perl); PERL_SYS_TERM(); }
The XS for the relevant module is in another comment in this thread. The code to load the module is vanilla:
newXS("boot_Clock", functionPointerToEXTERN_C_boot_Clock, __FILE__); eval_pv("boot_Clock", true);
|
|---|