|Subject:||Distribution should install to sitelib on perl 5.12+|
|X-Mailer:||MIME-tools 5.504 (Entity 5.504)|
|Message-ID:||<rt-4.0.18-5738-1510186970-802.0-0-0 [...] rt.cpan.org>|
The Makefile.PL will set INSTALLDIRS to 'perl' on perls > 5.7.3, as that's where at least some part of this distribution was added to core:This is correct, and works around the issue in older perls where privlib (or the 'perl' core install dir) is checked first for modules before sitelib (where CPAN normally installs to). Unfortunately this means it overwrites any existing files that were installed with core but it's the only way to allow module upgrades on these versions of perl. However in perl 5.12 this order was changed so that sitelib takes precedence. Therefore the distribution should install to sitelib as normal on these versions, rather than overwriting the core files. For example: INSTALLDIRS => (($] >= 5.007003 && $] < 5.012) ? 'perl' : 'site'), (ref: ) The Build.PL should also be updated with similar logic since it will be the file used on any modern perl, I'm not familiar with any other dual-life distributions using Build.PL but I would guess it should be like: installdirs => (($] < 5.012) ? 'core' : 'site'), (ref: ) This change should be made regardless of whether the distribution remains in core in the future, but especially if it doesn't. Installation to perls before 5.12 should remain unaffected but installation to newer perls will install to sitelib like any other CPAN module.