halfcountplus has asked for the wisdom of the Perl Monks concerning the following question:

I have an .so made with Inline::C containing functions used in the C sections of various other perl modules. In order to do this, I've used 'LIBS' => '-lmylib' and then #included a header in the C section.

I'm wondering if there is a tidier way to do that, as it requires copying the .so out of _Inline/lib. Does anyone know of any CPAN modules that do something similar to this, and if so, how is it packaged?

I wouldn't mind packaging the library as a normal C lib, but so far I haven't been able to compile it alone as it draws on the perl API. I presume there must be a way to do this if I scrutinize a makefile in build/ enough, but if anyone has any clues about that it would be appreciated.

Replies are listed 'Best First'.
Re: Common modules and Inline::C
by Anonymous Monk on Sep 12, 2011 at 15:36 UTC
    Make it into a standalone perl module? and use it; in the other ones? Maybe also see ExtUtils::Depends - Easily build XS extensions that depend on XS extensions

      It's already a stand-alone perl module, sorry if that wasn't clear. "Use" simply does not drag anything into the Inline::C namespace -- I end up with an undefined symbol at runtime.

      But ExtUtils::Depends looks like it should fit the bill, thanks.