Clear questions and runnable code
get the best and fastest answer
I'm not surprised that Params::Classify fails when used more than once in the same process.
Here it declares a single data structure per process:
That data structure will eventually contain pointers to Perl variables, as set here:
I don't believe that you can safely use Perl variables from one interpreter instance in a different instance of the interpreter.
You could try loading Params::Classify in multiple Perl "threads" (using threads.pm) and see if that also dies and file a bug against the module.
Or you could just get similar functionality in a way that doesn't require such a large chunk of XS code (since XS code is, by far, the single biggest source of core dumps in Perl -- because it is extremely hard to write robust XS code), especially XS code that entwines itself into everything by hooking 'entersub' and doing manipulations of the Perl opcodes.
When searching the module documentation for some hint of why it hooked 'entersub' and manipulated opcodes, I found none, but I did find:
This module is implemented in XS, with a pure Perl backup version for systems that can't handle XS.
So, if you really want Params::Classify features, you could use the non-XS implementation (you'll have to figure out how that is done).
Btw. have you tried that program?
No. I have no intention of even downloading Param::Classify, much less trying to reproduce your problem locally.
In reply to Re^5: Multiple perl interpreters and Module::Runtime (XS--)