G
Guenther Sohler
I have an Application using embedded Perl
it works in following steps
1) I allocate and create perl
2) I parse my perl script with the perl interpreter (perl_parse)
3) I definde my own functions using newXS
4) I run the perl script
5) Eventually some perl functions are called from within my c code
which properly do their job - all find
6) My program has the ability to run custom perl scripts. In this case
continue at 2
perl_parse is called again to read in the new perl script
7) Unfortunately all the other context already read is deleted. Varibles,
functions ... that means the fucntions called at 5 will fail
Is it possible to incrementally load perl scripts using perl_parse
eg if I load script1 which defines a=5, I parse and execute it, so a
becomes 5 ; then to parse script2 which prints out a, and then run script2
to see that a is set to 5.
How would it work ? what do I have to do ?
it works in following steps
1) I allocate and create perl
2) I parse my perl script with the perl interpreter (perl_parse)
3) I definde my own functions using newXS
4) I run the perl script
5) Eventually some perl functions are called from within my c code
which properly do their job - all find
6) My program has the ability to run custom perl scripts. In this case
continue at 2
perl_parse is called again to read in the new perl script
7) Unfortunately all the other context already read is deleted. Varibles,
functions ... that means the fucntions called at 5 will fail
Is it possible to incrementally load perl scripts using perl_parse
eg if I load script1 which defines a=5, I parse and execute it, so a
becomes 5 ; then to parse script2 which prints out a, and then run script2
to see that a is set to 5.
How would it work ? what do I have to do ?