in reply to Can I use C or ASM from core?

C code is linked to Perl through glue known as "XS". See perlxs, perlxstut. It's all core. Aforementioned Inline::C is just a tool to help generate XS.

Replies are listed 'Best First'.
Re^2: Can I use C or ASM from core?
by davido (Cardinal) on Nov 07, 2014 at 16:05 UTC

    Yes, thanks for clarifying that.

    An XS author writes XS, which is sorta-C with a lot of Perl framework. This gets compiled down to actual-C, and then to a library (.so, .dll, etc), which is loaded by perl using DynaLoader or XSLoader.

    Writing XS can be somewhat of a pain; there's boilerplate, cargo-cult, Perl guts/API stuff, and enough C to give one the impression of knowing what's going on. A module like Inline::C aims to reduce the boilerplate, and automate some of the process. The upcoming Inline::Module will further improve upon Inline by allowing Inline-authored distributions to ship with no Inline dependency.

    But Inline:: is really an automation tool to produce the common-case XS with less fuss.


    Dave