I used to use h2xs to start my Perl extension modules. Now I am testing Module::Starter.
Before we start, here are some modules to install
- Module::Starter - a simple starter kit for any module
- Module::Starter::PBP - Create a module as recommended in "Perl Best Practices"
- Module::Starter::XSimple - Create XS modules with Module::Starter
- ExtUtils::CBuilder - Compile and link C code for Perl modules
Module::Starter::PBP and Module::Starter::XSimple are plugin modules. I haven't figured out how to use them together. If you need to create a module using perlxs, then use Module::Starter::XSimple. There are other plugin modules, which I have not tried.
Follow the doc for Module::Starter::PBP to setup the config:
$ perl -MModule::Starter::PBP=setup
If you want to use Module::Starter::XSimple, you can edit the file $HOME/.module-starter/config:
- Remove "ExtUtils::MakeMaker" from the "builder:" line because Module::Starter::XSimple doesn't support it.
- Replace the plugin to "Module::Starter::XSimple" in the "plugins:" line.
Now run the command
$ module-starter --module=MyPackage::MyModule