in reply to embedded perl: C-Perl-C

There's an example of exactly what you're referring to in a perl.com article called Pathologically Polluting Perl. Explains some of the history and reasoning behind the Inline module.

HTH

-Ducky

Replies are listed 'Best First'.
Re: Re: embedded perl: C-Perl-C
by daveola (Sexton) on Sep 21, 2001 at 13:44 UTC
    No this won't accomplish the example I gave in the original post. I need to:

    1) Start with C main (so, it needs to be a perl library, not a modified perl)
    2) Call perl from C
    3) From inside the perl subroutine, call a C function in the same namespace as the C main()

    This is what I'm looking for. I'm beginning to think it can't currently be done because it would be too difficult to manage the stack, and probably nobody has needed it since most are happy with Inline, XS or perl_call.