McD has asked for the wisdom of the Perl Monks concerning the following question:
Wandering amongst the dragons here, seeking insight from the wizards.
Suppose I'm embedding Perl in my C app, as is so well documented in perlembed. I've constructed a PerlInterpreter my_perl, parsed my Perl code, and I'm occasionally calling call_argv("MyPerlFunction", ...);.
My question is this: is it possible, in my C app, to save off the state of the interpreter and restore it later?
I'm thinking of something like serializing my_perl, perhaps to disk, and restoring it later - thus saving not only the parsing/compiling, but more importantly, saving the state of things like Perl variables, etc.
I've read the docs and searched the net, but so far I'm coming to the conclusion that this may not be feasible with the API provided - I'd have to hack the perl library itself to provide a serialization interface, which might be a bridge too far.
What say ye, oh deep hackers?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Embedded Perl - Saving State?
by samtregar (Abbot) on Apr 30, 2009 at 16:41 UTC | |
by McD (Chaplain) on May 01, 2009 at 02:59 UTC | |
Re: Embedded Perl - Saving State?
by otto (Beadle) on Apr 30, 2009 at 18:48 UTC | |
Re: Embedded Perl - Saving State?
by repellent (Priest) on Apr 30, 2009 at 22:57 UTC | |
by McD (Chaplain) on May 01, 2009 at 03:04 UTC | |
Re: Embedded Perl - Saving State?
by schinkelm (Initiate) on May 01, 2009 at 13:15 UTC | |
by McD (Chaplain) on May 01, 2009 at 15:47 UTC |
Back to
Seekers of Perl Wisdom