in reply to Deleting a package

Can you fork or clone an interpreter in XS? Spawn a new thread? That way the parent stays clean.

You'd still be "nuking the interpreter" but it wouldn't have the state destroying consequences. I don't know how to do this, but mod_perl does something like it (I think)

Brad

Update: man perlapi
perl_clone
Create and return a new interpreter by cloning the current one.

PerlInterpreter* perl_clone(PerlInterpreter* interp, UV flags)