Setting INSTALLDIRS to 'site' for perl 5.11+
[email protected] (Robert Sedlacek) Sun, 23 Sep 2012 22:23:18 +0200
| Newsgroups | perl.makemaker |
|---|---|
| Message-ID | <1348431798.27548.8.camel@gomorrah> |
Hello, The Makefile.PL for ExtUtils::MakeMaker currently sets INSTALLDIRS to 'perl', so a CPAN update won't be shadowed by the core version in older perls. According to [1] this is no longer necessary for perl 5.11 and following. Those will look in 'site' before 'perl', so normal CPAN installations won't be shadowed by anything in core. A patch for the Makefile.PL is attached. [1] https://github.com/rjbs/perltodo/blob/master/Supply-Patches-to-Fix-Install-Location.mkdn regards, -- Robert 'phaylon' Sedlacek Perl 5 Consultant for Shadowcat Systems Limited - http://shadowcat.co.uk/
install_to_site_post_5011.patch
(text/x-patch, 544 B)
diff --git a/Makefile.PL b/Makefile.PL
index b802c73..e54937e 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -112,7 +112,7 @@ my $MM = WriteMakefile(
CONFIGURE_REQUIRES => {}, # We don't need ourself to install ourself.
BUILD_REQUIRES => { 'Data::Dumper' => 0, },
- INSTALLDIRS => 'perl',
+ INSTALLDIRS => ($] < 5.011 ? 'perl' : 'site'),
LICENSE => 'perl',
ABSTRACT_FROM => "lib/$PACKAGE_FILE.pm",
AUTHOR => 'Michael G Schwern <[email protected]>',