in reply to XS code block
In addition to chromatic's pointers, I would think that the perlxs and perlguts man pages might also be helpful (I don't recommend reading the PM copies, since they appear to be helplessly borken).