Why is it discouraged to use PPM perl modules with Strawberry perl on Windows?

混江龙づ霸主 提交于 2019-12-04 14:17:18

PPDs can actually include external libraries (e.g. XML::LibXML's package includes libxml2), so they can be simpler to install.

PPDs are already compiled, so they can be faster to install.

PPDs give you less control since they are prepared by someone else. You are limited to the modules available (which is thankfully a huge swath of what's available) and to the versions available.

I normally hesitate to mix two systems, but I have never encountered a single issue from using both ppm and cpan on the same build.

Just use the one that's convenient for you.

PPMs were created (by ActiveState, I think) so that users could install modules with XS extensions or which used external libraries, without needing to have a C compiler or make, or any of the unixy stuff that cpan expects to have present. One of their problems is that ActiveState (or someone) has to have made the PPM for the module you want, and all the modules it uses from CPAN. Sometimes this meant using an older version until they caught up, and sometimes it meant modules just weren't available.

The genius of Strawberry is that it provides a hidden unixy environment that cpan can use to build modules for you, so doing away with the need to package binaries.

This means you get the dependency checking done by cpan, and it becomes much easier (for certain values of easy) to install newer versions of modules, or to link to libraries in odd places, and for many more CPAN modules to be available without any effort from anyone.

The same arguments can be made about using a linux-distro packaging system. If you need a module version that's out of sync with the distro then you're stuck. If you want to use a more up to date Perl, you're stuck. Perl has its own very good packaging system in the CPAN ecosystem, so it really makes sense to use that if you can.

At the same time, sometimes it's more sensible to use a set of provided binary packages, especially if you have to roll out lots of systems, and your Perl install is only a small part of the collection of packages you need to keep track of.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!