in reply to Re: Can arbitrary XS/SWIG using modules be loaded into an embedded perl at runtime?
in thread Can arbitrary XS/SWIG using modules be loaded into an embedded perl at runtime?

I will try it and report back here. If it works then the ExtUtils::Embed documentation is perhaps misleading, or I'm retarded.

I interpreted the documentation to indicate that modules with binary components need explicit xs_init code. The alternate understanding is that the xs_init code is needed to call the modules from your C code. It's probably just the latter.

  • Comment on Re^2: Can arbitrary XS/SWIG using modules be loaded into an embedded perl at runtime?

Replies are listed 'Best First'.
Re^3: Can arbitrary XS/SWIG using modules be loaded into an embedded perl at runtime?
by kingkongrevenge (Scribe) on Jul 24, 2008 at 04:32 UTC
    I haven't tried it yet, but the "Pro Perl" book is a little more explicitly clear:
    If we want to use Perl modules that themselves make use of underlying C code (also called extensions), we have to go back and adjust the workings of our interpreter a little. In order to know how to load in the C library part of a Perl extension, the interpreter needs some additional help, which we provide by supplying a function pointer as the second argument to perl_parse. The function performs the job of bootstrapping the external C part of any extensions we want to use. Typically, we use the Dynaloader to dynamically load any modules on demand, so this is the only module we need to handle for most cases.