Could a kind soul please help me with the following problem:
I am trying to run multiple nested perl contexts, about like
this simplified pseudo code:
outerPerl= malloc(sizeof(PerlInterpreter));
perl_construct(outerPerl);
perl_parse(outerPerl,xs_init,argc,argv,environ);
perl_run(outerPerl);
[.lots of other things, that call functions in
the outerPerl context, and also:
innerPerl= malloc(sizeof(PerlInterpreter));
perl_construct(innerPerl);
perl_parse(innerPerl,xs_init,argc,argv,environ);
perl_run(innerPerl);
[more stuff that calls functions in innerPerl]
perl_destruct(innerPerl);
perl_free(innerPerl);
curinterp=outerPerl;
At this point, things in the outerPerl context don't
work anymore.
Of course perl is compiled with MULTIPLICITY, and I made
changes to perl_run, so that calllist(endav) gets delayed
till before perl_destruct().
What I think I have to do is execute part of perl_run()
again, but my understanding of the inner workings of perl
doesn't seem to be good enough yet to figure it out. I
suspect it has to do with setjmp()...
Please, any pointer anyone?
Gerd Knops
I am trying to run multiple nested perl contexts, about like
this simplified pseudo code:
outerPerl= malloc(sizeof(PerlInterpreter));
perl_construct(outerPerl);
perl_parse(outerPerl,xs_init,argc,argv,environ);
perl_run(outerPerl);
[.lots of other things, that call functions in
the outerPerl context, and also:
innerPerl= malloc(sizeof(PerlInterpreter));
perl_construct(innerPerl);
perl_parse(innerPerl,xs_init,argc,argv,environ);
perl_run(innerPerl);
[more stuff that calls functions in innerPerl]
perl_destruct(innerPerl);
perl_free(innerPerl);
curinterp=outerPerl;
At this point, things in the outerPerl context don't
work anymore.
Of course perl is compiled with MULTIPLICITY, and I made
changes to perl_run, so that calllist(endav) gets delayed
till before perl_destruct().
What I think I have to do is execute part of perl_run()
again, but my understanding of the inner workings of perl
doesn't seem to be good enough yet to figure it out. I
suspect it has to do with setjmp()...
Please, any pointer anyone?
Gerd Knops