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:
-
MyFormat is obviously just a placeholder.
-
I've chosen not to use the top namespace MyFormat directly, anticipating that if the format proves to be successful, other people will want to use it for their modules.
-
In addition to the XS-based parser, a pure-perl MyFormat::Simple::Parser::PP may be developed later, and the main module could fall back to it if the XS module is not available for some reason.
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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.