local::lib for CPAN.pm

Reading time: 1 minute

I’ve got too much going on this week to do much blogging, but I’m happy to say that my experiments teaching CPAN.pm to bootstrap local::lib look promising. During CPAN auto-configuration, when CPAN recognizes that the user doesn’t have write access to the Perl library directories, my experimental CPAN.pm offers to bootstrap local::lib after configuration is completed.

Once this is done and released as part of CPAN and core Perl (hopefully for 5.14 if I can get it done quickly), it will be possible to have a working CPAN setup for an ordinary user with a system Perl with about this much effort:

$ cpan
[... welcome blah blah ... do you want automatic configuration? ]
y
[... do you want local::lib? ]
y
[... auto config ... ]
[... auto mirror detection ... ]
[... bootstrapping local::lib ... ]
[... fixing up your shell config with PERL_* variables ... ]

cpan[1]> install Whatever::Module::You::Want

And done! A non-privileged user could have a working CPAN and local::lib with “cpan\n”, “y\n”, “y\n”. Spiffy!

Keep your fingers crossed and I’ll report back when I have it done.

•      •      •

If you enjoyed this or have feedback, please let me know by or