cpanpm icon indicating copy to clipboard operation
cpanpm copied to clipboard

Wishlist: First try distro packages for dependencies

Open kjetilk opened this issue 5 years ago • 0 comments

I have for a long time had a policy to first see if any dependencies of packages I install can be satisfied by the Linux distro I'm using. In practice, it means I check Debian stable first, and manually install it from there, and only if it can't, I install it from CPAN. This was actually reflected in policy in companies I worked for, we would only install from CPAN if one of the devs knew the code well. Since distros has a bit of extra QA process and since this means the behaviour doesn't change underneath you. I think it is a strength of the CPAN ecosystem that you can do this, quite unlike others where you are on a perpetual hampster wheel of upgrades.

You can often determine Debian package name from a CPAN module with some regexps, but recently, I found that metacpan has a field that gives the distro package name for a CPAN package.

Then, I figured, perhaps cpan now could do it for me, i.e. check if the package I install can be found in the distro, if so, install it from there. If not, grab it from CPAN, but check if any dependencies can be satisfied by a distro package. In this case, the version doesn't need to be the latest, it just needs to satisfy the version dependency.

kjetilk avatar Nov 20 '19 11:11 kjetilk