In this question about creating a new perl module, it was suggested to use Module::Build for any new packages.
I’m unable to find any examples using Module::Build that also compile c/c++ code.
I find this surprising is this really is the goto package for future development. Am I just blind?
That question is dated and the level of unrestrained enthusiasm that Brian shows for Module::Build isn’t really warranted — it works, and may be better for your situation, but it has its own share of problems, and currently is receiving only limited maintenance.
But to answer your specific question: if you have XS files, all you need to do is put the
.xsfiles in the top-level of your distribution, and they will be built, without you having to tell Module::Build anything.If you have additional
.cor.hfiles (including Devel::PPPort‘sppport.h) that should be built together with your module, put them in a directory and specify that directory as thec_sourceparameter to thenewconstructor from Module::Build.