daneus has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to embed several perl interpreters in C. The interpreters can be used in an interleaved fashion, i.e. there are running several of them "at the same time". Here is the source code.
The program creates two perl interpreters and both of them try to load the module Module::Runtime. The problem is that it crashes or cycles infinitely when it tries to load the module into the second interpreter.
For the sake of completeness there are two routines that load the module (perl_load_module_1 and perl_load_module_2). Neither of them works.
I have compiled it with the command:
gcc -o $@ $^ `perl -MExtUtils::Embed -e ccopts -e ldopts`
I've also tried to load other modules instead of Module::Runtime and all of them worked flawlessly.
I use the most recent perl-5.12.3, Mod::Runtime version is 0.007. Running perl -V gives me: http://pastebin.com/GvvciPSJ
I have been fighting this for over a week to no avail. In the end I used Module::Load instead of Module::Runtime, but nevertheless I would like to know where is the real problem.
Thank you very much for any replies.
daneus
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Multiple perl interpreters and Module::Runtime (-d)
by tye (Sage) on Feb 04, 2011 at 18:37 UTC | |
by daneus (Initiate) on Feb 07, 2011 at 09:43 UTC | |
by tye (Sage) on Feb 07, 2011 at 14:20 UTC | |
by daneus (Initiate) on Feb 08, 2011 at 09:43 UTC | |
by tye (Sage) on Feb 08, 2011 at 15:02 UTC | |
|