in reply to Inline::C and Dist::Zilla

What you are looking for is the new (infant, currently under rapid development) module, Inline::Module. Its purpose is to allow authors to write "Inline::C" code, and produce XS modules. The final product would be a module that, to the end user, is indistinguishable from plain old XS. See http://inline.ouistreet.com for the project's blog, and stop by #inline on irc.perl.org to discuss it.


Dave

Replies are listed 'Best First'.
Re^2: Inline::C and Dist::Zilla
by basiliscos (Pilgrim) on Nov 14, 2014 at 12:43 UTC

    Thanks, Dave

    I think I misunderstood the usage of Inline::C: it helps in creation XS-modules, but not in creation of distributions with XS-code.

    So, If I know XS, it would be less problems just to create old plain XS-distribution with XS-module, than using Inline::C

      I'm not sure I am interpreting your question correctly, but here goes:

      Inline::C gives the appearance of C code being included in-line with your Perl script. Internally this works by producing an XS module that the target codebase can bootstrap with Dynaloader and use. This happens quietly, behind the scenes. Someone else suggested that you could just take that auto-generated XS module and use it to create your own XS module via the time-honored tradition of copy/paste/fiddle. This has been how many people get started with their XS-based modules; prototype with Inline, then migrate to full XS.

      Inline::Module lets a distribution be created by using Inline to author the code, but then the end-user just gets the .so file installed where any other XS-generated .so (or .dll, etc) file would have been installed on any plain old XS based distribution.

      We're still working on it. Currently it works for ExtUtils::MakeMaker based distributions, and probably for Dist::Zilla by now as well. But documentation is sparse, and there are no guarantees that something won't change before we officially announce the release. Nevertheless, we would love for people to go ahead and give it a try, and to check in at #inline with questions. Issues can be posted to the module's GitHub repository issue tracker.


      Dave