Eric Wilhelm wrote:
# The following was supposedly scribed by
# Sisyphus
# on Thursday 23 December 2004 05:27 pm:


Yes - just grab the XS file that Inline::C generates (by building with
the Config option CLEAN_AFTER_BUILD => 0), and use it to build the
module in the normal way. Obviously, you then need to amend the .pm
file - and if you use the Inline Stack vars, then you'll need
Inline.h (also found in the build folder).

It occurred to me recently that it would be nice if Inline had an
option whereby all it did was output the XS file. I find I frequently
use Inline::C simply to autogenerate the XS file - and in such
situations the compilation that inevitably ensues is pretty much a
waste of time.


Question: Is there that much resistance from users to the Inline::C prereq to make it worth distributing XS code?

Probably not. I just like to keep things as simple as possible for the user. I feel that, in the long run, it keeps things simpler for me, too.
I've automated the whole procedure - it's just a matter of running 'perl build.pl' and I end up with a tarball for CPAN and a Win32 ppm package (binaries).



This is similar to the issues with Swig, with a lot of the same trade-offs. IE, you don't really want people sending you patches for the XS code, so why distribute it as such except that it eliminates a build dependency?


I've just been leaving my modules with Inline::C as prerequisites. But, assuming that you could convince me that I should do otherwise, I would be interested in making the changes/extensions to Inline to support xs-only generation, .pm rewriting, etc.

No - I wouldn't try to convince anyone to do as I do. I think it's just that if those features existed, then I would make use of them. It can't be all that important to me or I would have made the changes myself. As regards the xs-only generation, it has just occurred to me that perhaps that can already be done fairly easily by using Inline::ParseRegExp or Inline::ParseRecDescent. (Must check that out - I'm not doing much today.) Once you have xs file generation, I don't think there's any need for .pm rewriting.


Cheers,
Rob



Reply via email to