|Do you know where your variables are?|
Creating a new module with an XS submoduleby kikuchiyo (Pilgrim)
|on Feb 14, 2013 at 23:09 UTC||Need Help??|
kikuchiyo has asked for the
wisdom of the Perl Monks concerning the following question:
I want to create a module that will provide a Perl interface to a specific file format. (The format itself is still under development at this point, that's why I don't write details here.)
I want to re-use the project's reference parser, written in C, to do the parsing for me, however, I want to keep the XS part in a sub-module. Specifically, if the main module, providing the user interface, will be called MyFormat::Simple, then I'd want to put the XS module that interfaces with the C parser in MyFormat::Simple::Parser::XS.Three notes here:
Now my question is, how to set about to create all this? More specifically, which module creation framework to use, and how exactly?
Should I run h2xs twice, separately, for the two modules, once with -X for the main module that doesn't need XS, and once with -x for the XS module?
Or should I use some other supposedly better and more modern tool, like Dist::Zilla for the non-XS module?
Or should I create just one module skeleton, and work inside it on the submodule as well?
I appreciate any help.