| 1 | package XS::Tutorial; | ||
| 2 | BEGIN { our $VERSION = 0.02 } | ||
| 3 | 1; | ||
| 4 | |||
| 5 | =encoding utf8 | ||
| 6 | |||
| 7 | =head1 NAME | ||
| 8 | |||
| 9 | XS::Tutorial - documentation with examples for learning Perl XS | ||
| 10 | |||
| 11 | =over 4 | ||
| 12 | |||
| 13 | =item * L<XS::Tutorial::One> - how to pass to and return basic values from C functions | ||
| 14 | |||
| 15 | =item * L<XS::Tutorial::Two> - working with more than one value at a time | ||
| 16 | |||
| 17 | =back | ||
| 18 | |||
| 19 | =head1 SOURCES OF INFORMATION | ||
| 20 | |||
| 21 | =head3 XS Mechanics by Steven W. McDougall | ||
| 22 | |||
| 23 | A clear L<introduction|http://world.std.com/~swmcd/steven/perl/pm/xs/intro/> to XS programming. | ||
| 24 | |||
| 25 | =head3 Extending and Embedding Perl (Manning) by Simon Cozens and Tim Jenness | ||
| 26 | |||
| 27 | A thorough L<introduction|https://www.manning.com/books/extending-and-embedding-perl>, with many examples. Outdated in parts (mostly data structures) but still an excellent reference. | ||
| 28 | |||
| 29 | =head3 perldoc | ||
| 30 | |||
| 31 | =over 4 | ||
| 32 | |||
| 33 | =item * L<perlxs|http://perldoc.perl.org/perlxs.html>: syntax of xsubs | ||
| 34 | |||
| 35 | =item * L<perlapi|http://perldoc.perl.org/perlapi.html> : C macros used to interact with Perl data structures (and the interpreter) | ||
| 36 | |||
| 37 | =item * L<perlguts|http://perldoc.perl.org/perlguts.html>: Perl data structures | ||
| 38 | |||
| 39 | =item * L<perlxstypemap|http://perldoc.perl.org/perlxstypemap.html>: typemap syntax (translating C types into Perl) | ||
| 40 | |||
| 41 | =item * L<perlcall|http://perldoc.perl.org/perlcall.html>: how to call Perl subroutines and methods from XS | ||
| 42 | |||
| 43 | =item * L<perlxstut|http://perldoc.perl.org/perlxstut.html>: another XS tutorial | ||
| 44 | |||
| 45 | =back | ||
| 46 | |||
| 47 | =head3 ExtUtils::MakeMaker | ||
| 48 | |||
| 49 | The L<documentation|https://metacpan.org/pod/ExtUtils::MakeMaker> explains all of the options in C<Makefile.PL>. Useful if you need to pass additional flags or options to to the C compiler. | ||
| 50 | |||
| 51 | =head3 ppport.h | ||
| 52 | |||
| 53 | A header file, needed for compatibility across Perl versions. See L<Devel::PPPort|https://metacpan.org/pod/Devel::PPPort>. | ||
| 54 | |||
| 55 | =head3 Perl source code | ||
| 56 | |||
| 57 | if you can’t find an answer in documentation, grep the L<source|https://www.perl.org/get.html>. | ||
| 58 | |||
| 59 | =cut |