The excellent Travis Perl helpers make it easy submit automated coverage reports to Coveralls whenever you commit to GitHub. All that's needed is to set the COVERAGE environment variable.
Unfortunately, this doesn't include the XS portions of a module. But since Devel::Cover already supports XS modules out of the box, only a slight change is needed to make it work. Simply make the Travis Perl helpers compile and link your XS …
The perlxs man page recommends to define the PERL_NO_GET_CONTEXT macro before including EXTERN.h, perl.h, and XSUB.h. If this macro is defined, it is assumed that the interpreter context is passed as a parameter to every function. If it's undefined, the context will typically be fetched from thread-local storage when calling the Perl API, which incurs a performance overhead.
Unfortunately, many XS modules still ship without defining PERL_NO_GET_CONTEXT. This is probably due to the f…
Like many Perl hackers with a C background, I did my fair share of XS programming. But mostly, I contributed bug fixes and other minor changes. In the rare case that I had to add a new XSUB, I typically used another XSUB from the same project as template. Unfortunately, this cargo cult is common among XS authors.
When I wrote my first public XS module, CommonMark, from scratch, I decided to read the perlxs documentation front to back to get a better understanding of the features XS …