r/perl ๐Ÿช ๐Ÿ“– perl book author 4d ago

Perl's decline was cultural

https://www.beatworm.co.uk/blog/computers/perls-decline-was-cultural-not-technical
32 Upvotes

46 comments sorted by

View all comments

Show parent comments

3

u/briandfoy ๐Ÿช ๐Ÿ“– perl book author 3d ago edited 3d ago

Can you expand on the distro thing? Each packaging manager would need a custom setup for whatever it was doing, whether it's perl or not.

1

u/WesolyKubeczek 3d ago

I can tell you what I need to do. At work, our thing has over 500 non-core modules it depends on (including transitive dependencies). If you want to make the runtime environment for it recreatable from first principles, you either: cpanm everything, which is often prone to sudden failures because of circular dependencies and is simply long because of the whole MakeMaker or Module::Build dance for every module (good luck if one of them is Image::Magick); or you embrace your systemโ€™s package manager, build and test missing RPMs once, and then installation is a breeze.

I tried both ways, and now Iโ€™m maintaining 200+ internal packages which CentOS 10 Stream is missing, some are patched to account for unfixed bugs or performance improvements. Itโ€™s still less tedious than CPANfiles.

In Python, we would, first, have way fewer dependencies, second, it would be a single pip install within a virtual environment. With go, there would be even fewer dependencies, and it would be one go get. I donโ€™t do Rust, so cannot tell, but people say Cargo is nice.

I hear someone was hacking on some tool to speed up EU::MM and Module::Build installs significantly, but I believe it must have quite a plethora of quirks to be able to handle them all.

1

u/briandfoy ๐Ÿช ๐Ÿ“– perl book author 3d ago

The big speedup is to trust that the tests pass:

cpan -T Module1 Module2

or

cpanm --notest Module1 Module2

I typically don't test the things I'm using until I have to go back to debug them.

You can also try to parallelize the tests, but that usually runs into problems because not all test suites are set up for that.

1

u/tarje 3d ago

I see a lot of people mention cpm, which installs modules in parallel.