FAQ

On Feb 12, 2010, at 2:44 PM, Jerry D. Hedden wrote:

With 5.11, the order of @INC has been changed to put 'site_perl' in
the 'front' of the array. This means that for dual-lived modules, the
'core' version is in 'perl', and if it is update from CPAN, the CPAN
version will 'mask it' when it gets installed in 'site_perl'. In this
way, the 'core' stays unperturbed even if modules are updated.

Hence, Makefile.PL (or whatever) needs to have the following construct
for dual-lived modules:

INSTALLDIRS => ((($] >= 5.???) || ($] < 5.011)) ? 'perl' : 'site'),

Where the lower version number is when the module was first introduced
into 'core' (as per Corelist.pm).
I'll start my reply by applauding who ever got site_lib put at the front of @INC. I'm glad to see this change.

I definitely think this is a game changer. Now the CPAN versions of dual core modules don't have to write to the same library tree that core installs to. This solves the packaging nightmare: overwriting files distributed with another package without conflicting with the other package.

I am however concerned that changing @INC is only half of the problem. We've got 100+ dual core modules that may need to change their Makefile.PL/Build.PL to cope with this change. And since there is no well known documentation on the topic, chances are even if we got them cleaned up, INSTALLDIRS => 'perl' is probably in other modules just out of ignorance. It occurs to me that with this change, there is no longer a good reason that someone generating an install running Build.PL or Makefile.PL without arguments should generate an install to core path. It seems like EUMM and M::B would do well to ignore INSTALLDIRS if $] >= 5.011. Both installers could flip a warning message if they intend to ignore INSTALLDIRS with some sort of "notify the author/here's how you override me if you insist on installing into perl core directories" message.

As insane as this idea might sound initially, I'd like to hear p5p's take on the idea.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 6 | next ›
Discussion Overview
groupperl5-porters @
categoriesperl
postedFeb 12, '10 at 6:16p
activeFeb 14, '10 at 12:57a
posts6
users4
websiteperl.org

People

Translate

site design / logo © 2022 Grokbase