I\'ve been using local::lib to handle the installation of Perl modules on a server so I can get the right versions for some development work without polluting the system install
Update: For some time now, INSTALL_BASE
has been producing a better directory structure that avoids this problem for new installs.
And that's why the perl Makefile.PL INSTALL_BASE=...
convention (and the corresponding one for Build.PL
) used by install::lib sucks.
Removing (or renaming the directory so you have backup) is the easiest solution. You can find out what you had installed by looking for .pm
files.
cd ~
mv perl5{,16}
cd perl516/lib/perl5
find -name '*.pm' | xargs perl -MConfig -E'
for (@ARGV) {
s!^\./!!;
s!^5\.\d+\.\d+/!!;
s!^x86_64-linux/!!;
s!^auto/!!;
s!\.pm\z!!;
s!/!::!g;
say;
}
' | xargs cpan
(Do a dry run — one without the trailing | xargs cpan
— first.)
Note that if you don't want to be at the mercy of your admin's upgrades, you can use perlbrew
to easily install a whole build of Perl in your home dir.