Lee said:
Is there a preferred method of packaging an Inline::C module, perhaps
one that would compile the C in the correct place during the
installation, rather than on first run?
My preference is to package it as a normal (cpan-type distro) source
package.
If you run your Inline::C script with the Config option
'CLEAN_AFTER_BUILD=>0', you'll be able to go into the _Inline/build
directory and grab the XS file that it created.
Change the 'MODULE' and 'PACKAGE' entries in that XS file as appropriate,
then bundle the XS file with the other usual files (the normal '.pm',
Makefile.PL, CHANGES, README, MANIFEST, test suite) and you've got a distro
that can be built in the usual way without any dependence upon Inline at
all.
As an alternative, I've put Inline::C2XS on CPAN - which will write the XS
file for you from your Inline::C code. That module should really be doing
its stuff by plugging into the Inline::C module functionality .... but it
doesn't do it that way. Instead it's a (rather poor) wheel-reinvention that
just happens to work for me - and may also work for you if you choose to use
it.
Cheers,
Rob