in reply to Re^2: Extending & Embedding Perl simultaneously: How to share a scalar between perl callback sub and main body?
in thread Extending & Embedding Perl simultaneously: How to share a scalar between perl callback sub and main body?
Apologies for typo in the code sample. I tried prefixing "our", but that didnt change the result.
As almut said, I am using a cloned interpreter and the perl sub/callback is executed in the cloned interpreter context. So, is the problem in how I'm cloning it? Or does cloning by definition mean, I cannot "share". Here is a post describing how I've done the embedding.
One "crude" way I can think of is to implement a "shared memory" API on C side to save/retrieve data between the subs and main. Perhaps CPAN has modules like this already..but I'm really hoping there is a more "natural" solution.
http://markmail.org/thread/cjbhybjfikuirvud
http://markmail.org/thread/inetppjegt5iecl5
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Extending & Embedding Perl simultaneously: How to share a scalar between perl callback sub and main body?
by perlmonk1729 (Acolyte) on Dec 03, 2009 at 08:47 UTC | |
by BrowserUk (Patriarch) on Dec 03, 2009 at 09:18 UTC | |
by perlmonk1729 (Acolyte) on Dec 03, 2009 at 16:47 UTC | |
by perlmonk1729 (Acolyte) on Dec 03, 2009 at 19:12 UTC | |
by perlmonk1729 (Acolyte) on Dec 07, 2009 at 07:36 UTC | |
|