On 30/10/02 23:52 +0000, Christian Goetze wrote:
> > > > problem I'm running into is that any method defined as a C function will
> > > > not cause the .so to be loaded, giving me this type of error:
> > > >
> > > > Can't locate object method "new" via package "Yax" (perhaps you forgot to
> > > > load "Yax"?)
> > > >
> > > > The exact same code will run fine when run from a standalone perl script.
> >
> > This seems like a problem described in the "perlembed" manpage:
> >
> >        Using Perl modules, which themselves use C libraries, from
> >        your C program
> >
> >        If you've played with the examples above and tried to
> >        embed a script that use()s a Perl module (such as Socket)
> >        which itself uses a C or C++ library, this probably hap­
> >        pened:
> >
> >         Can't load module Socket, dynamic loading not available in this perl.
> >          (You may need to build a new perl executable which either supports
> >          dynamic loading or has the Socket module statically linked into it.)
> >
> > Are you calling perl_parse() with an xs_init function? If you don't know what
> > I'm talking about, please read the "perlembed" manpage. If that isn't the
> > problem, then it's certainly possible Inline is getting confused -- you might
> > be the first to try running Inline from an embedded interpreter.
> 
> Ok, I checked the code that sets up the parser. It does exactly the thing
> described in the perlembed page and it does load up dynaloader.
> 
> Anyway, I took Inline out and rewrote the module in pure XS, and that
> seems to cause no problems (wasn't so hard since it was nothing but a
> wrapper anyway).
> 
> Once off the critical path, we'll try to investigate deeper why Inline
> won't work with our embedded perl.

Did you try writing it as an Inline *module* (like Math::Simple in the
distro)?

Cheers, Brian

Reply via email to