[Bug 1138817] Perl core modules are installed into vendor_perl, so they are not updated by cpan

bugzilla at redhat.com bugzilla at redhat.com
Mon Sep 8 13:05:16 UTC 2014


https://bugzilla.redhat.com/show_bug.cgi?id=1138817

Petr Pisar <ppisar at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugzilla.redhat.com
                   |                            |/show_bug.cgi?id=1132321



--- Comment #1 from Petr Pisar <ppisar at redhat.com> ---
(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?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=NaLuyntmoy&a=cc_unsubscribe



More information about the perl-devel mailing list