in reply to XS: use module into package

Use the API's eval_sv or eval_pv instead of eval, passing it the same string.

Update: s/call_/eval_/g

Replies are listed 'Best First'.
Re^2: XS: use module into package
by Anonymous Monk on Jun 13, 2011 at 18:24 UTC
    But is there a use() function somewhere in the Perl API? I'm trying to avoid using eval.

      I don't think so, but it's moot. The reason you had to use eval in code doesn't go away by loading the module using a different interface. You can't go and change the package the parent Perl code was compiled into.

        But the code the eval executes is being parsed into a sequence of API calls that finally end up changing the caller package by using a module into it. I'm looking for these API functions.

        Except that maybe these are not "API" calls, but really internal stuff not meant for the general public.