Skip Menu |

This queue is for tickets about the Math-BigInt CPAN distribution.

Report information
The Basics
Id: 119199
Status: resolved
Priority: 0/
Queue: Math-BigInt

People
Owner: Nobody in particular
Requestors: AGRUNDMA [...] cpan.org
Cc: DBOOK [...] cpan.org
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.999803
Fixed in: 1.999806



Subject: [PATCH] After switching to MakeMaker, no longer installs over core version
The Module::Install version of this module made sure to install itself over the core version by using install_as_core(). Now that MakeMaker is used, the similar INSTALLDIRS => 'perl' setting needs to be used. Patch attached.
Subject: 0001-Set-INSTALLDIRS-perl-to-ensure-we-install-over-the-c.patch
From a02399c35f170b50bc1652a42d1edbe8d18f7686 Mon Sep 17 00:00:00 2001 From: Andy Grundman <andyg@activestate.com> Date: Sat, 10 Dec 2016 18:04:31 -0500 Subject: [PATCH] Set INSTALLDIRS => 'perl' to ensure we install over the core version and not into sitelib or elsewhere. --- Makefile.PL | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 Makefile.PL diff --git a/Makefile.PL b/Makefile.PL old mode 100644 new mode 100755 index 4e8cb12..21d526a --- a/Makefile.PL +++ b/Makefile.PL @@ -15,6 +15,7 @@ WriteMakefile 'Test::More' => 0.94, 'Math::Complex' => 1.39, }, + 'INSTALLDIRS' => 'perl', # install over the core version 'LICENSE' => 'perl_5', 'LIBS' => [''], # e.g., '-lm' 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' -- 2.8.1
I forgot to mention that the same fix needs to be applied to any other core modules that made the switch to MakeMaker.
Thanks. I have uploaded the following four distributions to CPAN Math-BigInt-1.999805.tar.gz Math-BigRat-0.2610.tar.gz Math-BigInt-FastCalc-0.5004.tar.gz bignum-0.46.tar.gz Sorry for the inconvenience.
On Sat Dec 10 18:05:31 2016, AGRUNDMA wrote: Show quoted text
> The Module::Install version of this module made sure to install itself > over the core version by using install_as_core(). Now that MakeMaker > is used, the similar INSTALLDIRS => 'perl' setting needs to be used. > Patch attached.
Because of this change anyone who has installed 1.999803 or 1.999804 on perl 5.12+ can't upgrade their Math::BigInt anymore because since 5.12 'site' is ahead of 'perl', as one would expect it to be. There are legitimate reasons to want to install to core on <5.12, but you never want to do it on 5.12+. Leon
On Tue Dec 13 09:11:58 2016, LEONT wrote: Show quoted text
> There are legitimate reasons to want to install to core on <5.12, but > you never want to do it on 5.12+.
I noticed this issue when trying to upgrade the Math::* modules on a 5.10 build of ActivePerl, where as you say it needs to be installed to core to work at all. Is the right fix something like this, then? INSTALLDIRS => $] >= 5.012 ? 'site' : 'perl'
Copied my response on ticket #119225: The correct fix for this is to include logic such as other dual life modules have, such that INSTALLDIRS is 'perl' only after the module became core and before 5.012: https://metacpan.org/source/EXODIST/Test-Simple-1.302067/Makefile.PL#L53-54 https://metacpan.org/source/JPEACOCK/version-0.9917/Makefile.PL#L63-65 For bignum and Math::BigRat, INSTALLDIRS should be 'perl' if ($] >= 5.008 and $] < 5.012). For Math::BigInt::FastCalc, INSTALLDIRS should be 'perl' if ($] >= 5.009003 and $] < 5.012). For Math::BigInt, INSTALLDIRS should be 'perl' if ($] < 5.012). In all other cases, it should be 'site' or omitted.
Thanks Dan for the proper fix. Peter: Thanks for the quick response with new versions, and I'm sorry for not fully understanding the implications on newer versions. The details of the site vs perl @INC swap were new to me. Hopefully this didn't bite too many people.
Thanks to everyone who have contributed, and Dan especially for the exact fixes. I have now uploaded the following files to CPAN. Hopefully, it is correct this time. bignum-0.47.tar.gz Math-BigInt-1.999806.tar.gz Math-BigInt-FastCalc-0.5005.tar.gz Math-BigRat-0.2611.tar.gz