NAME

XS::Tutorial - documentation with examples for learning Perl XS

SOURCES OF INFORMATION

XS Mechanics by Steven W. McDougall

A clear introduction to XS programming.

Extending and Embedding Perl (Manning) by Simon Cozens and Tim Jenness

A thorough introduction, with many examples. Outdated in parts (mostly data structures) but still an excellent reference.

perldoc

  • perlxs: syntax of xsubs

  • perlapi : C macros used to interact with Perl data structures (and the interpreter)

  • perlguts: Perl data structures

  • perlxstypemap: typemap syntax (translating C types into Perl)

  • perlcall: how to call Perl subroutines and methods from XS

  • perlxstut: another XS tutorial

ExtUtils::MakeMaker

The documentation explains all of the options in Makefile.PL. Useful if you need to pass additional flags or options to the C compiler.

ppport.h

A header file, needed for compatibility across Perl versions. See Devel::PPPort.

Perl source code

if you can’t find an answer in documentation, grep the source.