Tassilo Parseval <[EMAIL PROTECTED]> writes: >On Fri, Mar 05, 2004 at 02:01:55PM +0000 Rafael Garcia-Suarez wrote: >> Tassilo Von Parseval wrote in perl.xs : >> > >> > The idea of >> > >> > eval_pv("require Module;", FALSE); >> > >> > did occur to me, but it feels a little bit like cheating. >> >> There is require_pv(const char*) that does just this (from perl.c). >> >> NB. "no Module" should work even if Module hasn't been used before; >> core dumps denote a bug. > >As it turns out, the core dumps happen with 5.8.3 but not with 5.8.0. > >Another thing I wonder about though is, when I do > > load_module(PERL_LOADMOD_NOIMPORTS, > newSVpv("Device::CDROM::linux", 20, Nullsv); >
I think even if you are not importing you need a NullSsv to terminate the <stdarg> arglist for C: load_module(PERL_LOADMOD_NOIMPORTS, // flags newSVpv("Device::CDROM::linux", 20), // package Nullsv, // Version Nullsv); // No args >it barfs with the message > > Can't locate Device/CDROM/linux ... > >What happened to the ".pm" suffix? It works when I do > > load_module(PERL_LOADMOD_NOIMPORTS, > newSVpv("Device::CDROM::linux.pm", 23), Nullsv); > >which is slightly odd. > >Tassilo