in reply to
Re: $perl_extension ? require SWIG : require XS;
in thread $perl_extension ? require SWIG : require XS;
APP2 isn't quite up-to-date here:
We now have InlineX::C2XS, InlineX::CPP2XS and InlineX::XS. The first two modules convert the code from Inline::C or Inline::CPP respectively into "stand-alone" XS. InlineX::XS is a wrapper for Inline::C which can auto-convert the inlined C (or rather the inlined XS) into "stand-alone" XS code during make dist time.
This means that you can write a module using Inline::C and use that for a rapid development and benefit from the close Perl+C association that makes Inline::C attractive. Then, when you're ready to upload to CPAN, you just make dist and get an ordinary CPAN distribution that does not rely on Inline::C. Sounds whacky? Probably. Have a look at the documentation for a better explanation of the concept.