Bug 1127585 - Perl 3rd-party core modules not installed to core
Summary: Perl 3rd-party core modules not installed to core
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: perl
Version: 7.2
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: perl-maint-list
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-07 08:13 UTC by Matt Sharpe
Modified: 2014-08-07 11:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-07 11:00:44 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
CentOS 7467 None None None Never

Description Matt Sharpe 2014-08-07 08:13:06 UTC
Perl has some 3rd party modules which are considered core, such as ExtUtil::MakeMaker and Data::Dumper, the full list can be found through the Module::CoreList module. The RHEL perl, perl-core, and packages for those modules do not install to the correct directory however.

3rd party core modules get installed into vendorlib instead of privlib and archlib, resulting in code that relies on sandboxing non-core modules being unable to find dependencies. In the case of cpanminus, a very common perl module installation tool, this breaks module installation. This effectively leaves users unable to package custom applications with automatically bundled dependencies as core modules are not found and dependencies are unable to be installed.

I think the appropriate solution is to install all core modules into the standard perl directories with only regular 3rd party modules, not core 3rd party modules as well, going into vendorlib.

Comment 2 Petr Pisar 2014-08-07 11:00:44 UTC
While putting dual-lived modules into core directories sounds reasonable, there are issues preventing from it:

(1) The debugging files from corresponding *-debuginfo sub-packages would conflict with perl-debuginfo (see bug #878863).

(2) Bootstrapping perl requires both of the module versions (the ones distributed with perl sources and the ones distributed from CPAN) available at the same time.

(3) The CPAN modules are third-party and so they clearly belongs to vendor (or site) directory. Reading their Makefile.PL reveals that none of them defaults to core directory. Morover other distributions also do not install dual-lived modules into core directory.


Regarding the cpanminus:

I think this is cpanminus bug that it ignores non-core directories. There are many reasons why users would like to prefer their own modules from vendor or site.

The documentation states:

--self-contained
           When examining the dependencies, assume no non-core modules are
           installed on the system. Handy if you want to bundle application
           dependencies in one directory so you can distribute to other 
           machines.

And as you said 'the full list can be found through the Module::CoreList'.

Therefore cpanm should use the Module::CoreList to select core modules instead of blindly disabling vendor and site directories. Or it should download the missing dual-lived modules from CPAN as it do with any other modules.


Note You need to log in before you can comment on or make changes to this bug.