On Nov 12, 2005, at 10:29 AM, Xavier Noria wrote:

Because the main module in the distribution is a pure Perl module. Some of it is factored out for speed to C, and I wanted to put that in a second, auxiliar module. Maybe this is just not the natural way to prepare a distro with XS (I am a newbie here).

Readonly and Readonly::XS may serve as a useful model. Those are distributed separately. NAME isn't an issue if you make 2 distros. If you want people to be able to use the pure Perl version on its own even if they can't use the XS version, I'd do that.

If the module's functionality is part Perl and part XS, the standard way of doing things is to put everything in the same package. In fact, it's usually a good idea for maintenance reasons do everything you can in Perl and only implement stuff in XS that 1) can't be done any other way and/or 2) has been identified as a performance bottleneck and can justify the extra maintenance burden of XS.

Thanks for such a detailed explanation.

It's time for me to give back after having gotten a bunch of good advice here recently. :)

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/

Reply via email to