in reply to Can you create another perl interpreter within the current script?

Huh? Import the subs from another package? Just walk the package's symbol table and do some junk with typeglobs. No magic required. Or are you trying to do something fancier than that?
  • Comment on Re: Can you create another perl interpreter within the current script?

Replies are listed 'Best First'.
Re: Re: Can you create another perl interpreter within the current script?
by IlyaM (Parson) on Mar 04, 2002 at 21:04 UTC
    I guess he wants to import some subs without loading whole package. Sounds like a very crazy idea.

    One possible solution is creation of separate process so it can compile that package without execution. See source code of package O to find how to do it. B::Deparse can be used to obtain source code of those subs.

    --
    Ilya Martynov (http://martynov.org/)

      > Sounds like a very crazy idea.
      It is >:-)

      > B::Deparse can be used to obtain source code of those subs.
      That's close to what I want, and is probably going to be the most practical. I get the feeling I can't compile the optree and then selectively stop execution in the same script. I could just wait til TheDamian has the time to create and finish Parse::Perl ... hmmm.
      Thanks for the input IlyaM!

      broquaint