更新时间:2022-03-30 23:19:54
一般来说,你不能。如果您接受并从不同的角度来解决问题,那么您的沮丧就会减少很多。 Module :: CoreList 提供了应该的列表在所有安装中都包含在最低限度内,但是供应商不需要遵守,大多数发行版包括许多不是核心部分的模块。禁止建立自己的数据库,其中包含哪个版本的每个发行版 - 一项艰巨的任务 - 没有太多希望。请注意,即使对于发行版本的模块,安装的版本可能会有所不同。
In general you can't. You'll have a lot less frustration if you accept that and approach the problem from a different angle. Module::CoreList provides a list of what should be included in all installations as a bare minimum but vendors aren't required to adhere to that and most distributions include many modules that aren't part of the core. Barring building your own database of what was included in which version of each distribution -- a daunting task -- there's not much hope. Note that even for modules that came with a distribution the installed version might be different.
我可以看到几种不同的方法:
I can see a few different ways to approach this:
requires
section of the Build.pl script. The cpan shell can follow and resolve
dependencies automatically.