in reply to xs code in a perl module
I'd recommend against doing this. If others are already (or eventually will) use the XS module but don't need the functionality from the one you propose to encompass it by, then they are two distinct distributions. One just so happens to use the other. What happens if you realize you want another small XS distribution... will you bundle that as well? Now people who want the first small library have to install a distribution with even more code they don't need.
I have several examples of this sort of thing. I put all of the dissimilar/separate XS code into their own distributions, then require it in higher-level distributions. That allows anyone to use X::Y; and use X::Z; without requiring them to use X; that may have brought in X::A through X::X, which contain functionality they have no need for.
For example, my RPi::WiringPi distribution pulls in 10 or so XS distributions (eg: RPi::I2C, RPi::SPI, RPi::DHT11). Instead of forcing users to install a whole crapload of distributions they don't need by forcing them to install the top-level one (which takes a relatively significant time to build on the platform it was designed for), they can just install individual components if that's all they need (SPI for example). There are benefits to installing the whole shebang, but that's only if you're going to use multiple pieces of the functionality.
If the two distributions can be used independently from one another (in your case it sounds like there are benefits to using them independently), they should, imho, remain separate.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: xs code in a perl module
by frazap (Monk) on Oct 26, 2017 at 13:36 UTC |