I recently ran into some trouble installing some modules and discovered to my surprise that many of the modules that had been installed, have duplicated installations and versions. Trying to track where stuff goes in a standard (if there is such a thing) installation using cpanm
, I found the following results very confusing.
The reports show these locations:
- Using
cpan -V
:
# cpan -V
/usr/bin/cpan script version 1.672, CPAN.pm version 2.22
--------------------------------------------------
Checking install dirs...
Checking core
+ /usr/share/perl5/5.26
+ /usr/lib/perl5/5.26/x86_64-cygwin-threads
Checking vendor
+ /usr/share/perl5/vendor_perl/5.26
+ /usr/lib/perl5/vendor_perl/5.26/x86_64-cygwin-threads
Checking site
+ /usr/local/share/perl5/site_perl/5.26
+ /usr/local/lib/perl5/site_perl/5.26/x86_64-cygwin-threads
Checking PERL5LIB
no directories for PERL5LIB
Checking PERLLIB
no directories for PERLLIB
- Using
perl -V:.*site.*
:
# perl -V:.*site.* |column -t -s "=" |sort -d -i -k 1.22
d_sitearch 'define';
usesitecustomize 'undef';
siteprefix '/usr/local';
siteprefixexp '/usr/local';
installsitebin '/usr/local/bin';
installsitescript '/usr/local/bin';
sitebin '/usr/local/bin';
sitebinexp '/usr/local/bin';
sitescript '/usr/local/bin';
sitescriptexp '/usr/local/bin';
installsitearch '/usr/local/lib/perl5/site_perl/5.26/x86_64-cygwin-threads';
sitearch '/usr/local/lib/perl5/site_perl/5.26/x86_64-cygwin-threads';
sitearchexp '/usr/local/lib/perl5/site_perl/5.26/x86_64-cygwin-threads';
installsitehtml1dir '/usr/local/share/doc/perl/html/html1';
sitehtml1dir '/usr/local/share/doc/perl/html/html1';
sitehtml1direxp '/usr/local/share/doc/perl/html/html1';
installsitehtml3dir '/usr/local/share/doc/perl/html/html3';
sitehtml3dir '/usr/local/share/doc/perl/html/html3';
sitehtml3direxp '/usr/local/share/doc/perl/html/html3';
installsiteman1dir '/usr/local/share/man/man1';
siteman1dir '/usr/local/share/man/man1';
siteman1direxp '/usr/local/share/man/man1';
installsiteman3dir '/usr/local/share/man/man3';
siteman3dir '/usr/local/share/man/man3';
siteman3direxp '/usr/local/share/man/man3';
installsitelib '/usr/local/share/perl5/site_perl/5.26';
sitelib '/usr/local/share/perl5/site_perl/5.26';
sitelib_stem '/usr/local/share/perl5/site_perl/5.26';
sitelibexp '/usr/local/share/perl5/site_perl/5.26';
- Using
@INC
:
# perl -e 'print join("\n",@INC,"")'
/usr/local/lib/perl5/site_perl/5.26/x86_64-cygwin-threads
/usr/local/share/perl5/site_perl/5.26
/usr/lib/perl5/vendor_perl/5.26/x86_64-cygwin-threads
/usr/share/perl5/vendor_perl/5.26
/usr/lib/perl5/5.26/x86_64-cygwin-threads
/usr/share/perl5/5.26
The result is that cpan-outdated -p --verbose
show a completely different (and shorter) list of outdated modules than what cpan -lO
does. Needless to say, modules are installed all over the place and I don't see how to understand if there is a default install location and where it goes, or should go.
QUESTION:
- So what is the difference between the
core
,vendor
andsite
type of paths? - Why are there 2 paths in each type?