Re: `cpan` unusable on small-RAM machines
[email protected] ("Philippe Bruhat (BooK)")
| Newsgroups | perl.perl5.porters |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jan 29, 2026 at 01:39:07PM +0000, Paul "LeoNerd" Evans wrote: > On Tue, 14 Nov 2023 14:17:37 +0000 > "Paul \"LeoNerd\" Evans" <[email protected]> wrote: > > However, I'm still not super inclined to actually continue maintaining > CPAN.pm *itself*, because every time I try to dive into the code I find > it a huge twisty nightmare of decades of accumulated cruft. It's hard > to work out what it is supposed to be doing or where or why. I still > feel that the time is well past due, to consider building a brand new > cleanroom small/neat/efficient "install me some modules from CPAN" > client to live in perl core. If I am going to put in a nontrivially > small amount of effort, it is that which I'd prefer to work on. Years ago, at a PTS (maybe Berlin 2015?) David Golden handed me some notes to transcribe, about his CPAN::Common ideas. https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/cpan-common.md Reading those notes conviced me that the individuals steps needed to install a module could be split up and made available as a core (dual-life) module. With a CPAN::Common, anyone interested in writing a new client could build one on top of it. A CPAN client should really just be a UI stringing those individual steps together[*], producing the same final result (an installed distribution). Once we have this (even just some of the individual parts), we could start replacing the CPAN.pm internals, piece by piece, to use those shared parts. And build the CPAN.pm of Theseus, so to speak. Green field is exciting, but we should remember that any pile of accumulated cruft holds, besides inevitable technical debt, the hard-won experience of meeting the real world. CPAN.pm has been dealing with the real world for almost 30 years now. -- BooK [*] I have, for example, long toyed with the idea of installing multiple versions of modules in a git repository, to be able to quickly install and uninstall successive versions, with a goal of being able to bisect a minimum version of dependencies. Or easily and reproducibly produce an install with specific versions of each module. I wasn't going to write my CPAN client, though, and few of them have hooks where I could inject the necessary code. -- Philippe Bruhat (BooK) Treat those you outrank well... you never know when they will outrank you. (Moral from Groo #7 (Image))