Description of problem: As perl core modules are broken into separate packages, these packages install the modules into vendor_perl. By default the vendor_perl directory precedes the core module directory in @INC. CPAN by default will install updates to core modules in the core directory, not site_perl. Therefore in a default configuration, updating a core module with cpan or cpanm appears to work, but the RPM version in vendor_perl continues to be used instead. Version-Release number of selected component (if applicable): Depends on RPMs that are out of date with CPAN (this will always happen for some time at least) Currently, perl-Test-Simple-1.001002 is older than the CPAN version of Test-Simple-1.001003 required to install an updated version of POE. How reproducible: Always Steps to Reproduce: 1. Install perl and perl-core from yum 2. Run "cpan Test::Simple" or "cpanm Test::Simple" Actual results: New version of Test-Simple distribution is installed but old version from RPM continues to be used, so cpan cannot install modules requiring new version Expected results: New version of Test-Simple distribution is used Additional info: Can be avoided by using local::lib or modifying @INC. Maybe there is a better solution.
(In reply to Dan Book from comment #0) > Description of problem: > As perl core modules are broken into separate packages, these packages > install the modules into vendor_perl. By default the vendor_perl directory > precedes the core module directory in @INC. True. > CPAN by default will install > updates to core modules in the core directory, not site_perl. No. It installs all modules into the same place. I think it used to install core modules into core directory a lot of years ago, but this not true anymore. > Steps to Reproduce: > 1. Install perl and perl-core from yum > 2. Run "cpan Test::Simple" or "cpanm Test::Simple" > > Actual results: > New version of Test-Simple distribution is installed It's installed either into site directory or local::lib directory. It depends what you choose at cpan configuration. If it's configured for site directory, then the modules will be installed there. Otherwise the modules will be installed into ~/perl5 and your ~/.bashrc will be modified to set PERL_MM_OPT and PERL_MB_OPT variables, if you select so. > but old version from RPM continues to be used, In addition, if you install perl-homedir package, PERL5LIB and PERL_LOCAL_LIB_ROOT will be set on login, so any perl invocation will use the ~/perl5 tree automatically. I think this is what brought your confusion. The cpan installs into ~/perl5 but does use it by default. > Can be avoided by using local::lib or modifying @INC. Maybe there is a > better solution. I think the best solution is to modify the cpan client to offer creating the site directories. If it succeeds, it will default installation to site directories instead of the local::lib. See bug #1132321. Or does you cpan client behave differently?
When testing this it was not using local::lib or any such local install. There was no ~/perl5. CPAN and cpanm both install the updated Test::Simple into /usr/share/perl5 by default. Non-core modules are installed into the site perl directory which is /usr/local/share/perl5: $ perl -V:installsitelib installsitelib='/usr/local/share/perl5'; But there is no trace of the Test::Simple distribution there after having both cpan and cpanm "successfully" install the updated distribution. /usr/share/perl5/Test/Simple.pm however is the updated version. The problem is that while /usr/local/share/perl5 comes before /usr/share/perl5/vendor_perl (where the RPM installs to), /usr/share/perl5 comes after in @INC.
I can't seem to reproduce it again with the latest version of CPAN or Test::Simple. It is installing to /usr/local/share/perl5 now. Maybe was a bug in an earlier version. Will see if it happens again.
Confirming that this was a bug in the Test::Simple distribution. It was fixed to install into the site directory in perl > 5.12.