On Mon, 11 Jun 2001, Jeff Hobbs wrote:

> Ryan,
>
> Before you spend a lot of time building things to work the other
> way, look at tclperl by Jean-Luc Fontaine.  He's also done a
> tclpython.

Thanks for the pointer Jeff.  I just spent the some time trying to get
Inline::Tcl working with tclperl.  I'm getting what appears to be
reentrancy problems.  It seems like the perl stack gets reset when you
create another instance of a perl interpreter within tcl.  Same thing when
I run Inline::Tcl from using tclperl.

I thought I would toss this one out to the perl-bowels experts.  Is there
a safe way to create another instance of a perl interpreter while the
current interpreter is running.  I think this is the equivalent of running
perl_run(perl_interp1); from within perl_run(perl_interp2);  The
version of perl that I'm running is compiled for multiplicity.  The
changes that would be necessary within perl to make it work this way
would not be pretty.  Does anyone else have an idea on how to do this?
I don't plan on hacking perl, it will have to be tclperl that will change.
For those not familiar with tclperl, it goes through a similar startup
sequence as in perlmain.c:
        my_perl = perl_alloc();
        perl_construct(my_perl);
        perl_parse(...);
        perl_run(my_perl);

Perhaps I need to instantiate the two interpreters I'd like to use before
running them.  From the info I can dig up about multiplicity "you can have
completely separate and independent interpreters inside the same process"

I've read perlembed, but the example in there is too simple.  I don't
think perl is meant to do this.

Since this is probably an issue with multiplicity, perhaps I'll take this
to a perl newsgroup.  Stabs in the dark welcome.

Ryan Sadler

>
>   Jeff Hobbs                     The Tcl Guy
>   Senior Developer               http://www.ActiveState.com/
>       Tcl Support and Productivity Solutions
>
>
> > -------- Original Message --------
> > Subject: Inline::Tcl 0.10 and a success story
>       ...
> > This example really makes me think that Inline has the potential to be
> > the ultimate _GLUE_.  For it to be the ultimate however, I think the
> > Inline has to go both ways: perl procedures also callable from Tcl,
> > sharing of data space, etc.  I'm going to be dabbling at this
> > during the summer and see what I can come up with.
>




Reply via email to