Commit 0d6b4aa1 authored by gregor herrmann's avatar gregor herrmann

Imported Upstream version 1.9993

parent ba273af8
BUGS 100644 → 100755
For an updated list of bugs, see
https://rt.cpan.org/Public/Dist/Display.html?Name=Math-BigInt
The following list is not up to date:
Known bugs: Known bugs:
......
This diff is collapsed.
...@@ -4,7 +4,6 @@ CHANGES ...@@ -4,7 +4,6 @@ CHANGES
CREDITS CREDITS
examples/1000.txt examples/1000.txt
examples/bigprimes.pl examples/bigprimes.pl
examples/hailstone.pl
examples/prime.pl examples/prime.pl
GOALS GOALS
HISTORY HISTORY
......
...@@ -7,5 +7,6 @@ ...@@ -7,5 +7,6 @@
^MYMETA\.(yml|json)\z ^MYMETA\.(yml|json)\z
pm_to_blib pm_to_blib
\.git \.git
\.*tmp
.*\.patch\z .*\.patch\z
^Math-BigInt- ^Math-BigInt-
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"Original code by Mark Biggar, overloaded interface by Ilya Zakharevich., Tels <nospam-abuse@bloodgate.com>" "Original code by Mark Biggar, overloaded interface by Ilya Zakharevich., Tels <nospam-abuse@bloodgate.com>"
], ],
"dynamic_config" : 1, "dynamic_config" : 1,
"generated_by" : "ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150", "generated_by" : "ExtUtils::MakeMaker version 6.94, CPAN::Meta::Converter version 2.140640",
"license" : [ "license" : [
"perl_5" "perl_5"
], ],
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
"prereqs" : { "prereqs" : {
"build" : { "build" : {
"requires" : { "requires" : {
"ExtUtils::MakeMaker" : "6.42", "ExtUtils::MakeMaker" : "6.59",
"Test::More" : "0.62" "Test::More" : "0.62"
} }
}, },
"configure" : { "configure" : {
"requires" : { "requires" : {
"ExtUtils::MakeMaker" : 0 "ExtUtils::MakeMaker" : "0"
} }
}, },
"runtime" : { "runtime" : {
...@@ -38,5 +38,5 @@ ...@@ -38,5 +38,5 @@
} }
}, },
"release_status" : "stable", "release_status" : "stable",
"version" : "1.997" "version" : "1.9993"
} }
...@@ -3,21 +3,21 @@ abstract: 'Arbitrary size integer/float math package' ...@@ -3,21 +3,21 @@ abstract: 'Arbitrary size integer/float math package'
author: author:
- 'Original code by Mark Biggar, overloaded interface by Ilya Zakharevich., Tels <nospam-abuse@bloodgate.com>' - 'Original code by Mark Biggar, overloaded interface by Ilya Zakharevich., Tels <nospam-abuse@bloodgate.com>'
build_requires: build_requires:
ExtUtils::MakeMaker: 6.42 ExtUtils::MakeMaker: '6.59'
Test::More: 0.62 Test::More: '0.62'
configure_requires: configure_requires:
ExtUtils::MakeMaker: 0 ExtUtils::MakeMaker: '0'
dynamic_config: 1 dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 2.112150' generated_by: 'ExtUtils::MakeMaker version 6.94, CPAN::Meta::Converter version 2.140640'
license: perl license: perl
meta-spec: meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4 version: '1.4'
name: Math-BigInt name: Math-BigInt
no_index: no_index:
directory: directory:
- t - t
- inc - inc
requires: requires:
perl: 5.006002 perl: '5.006002'
version: 1.997 version: '1.9993'
...@@ -11,36 +11,9 @@ name 'Math-BigInt'; ...@@ -11,36 +11,9 @@ name 'Math-BigInt';
# Get most of the details from the primary module # Get most of the details from the primary module
all_from 'lib/Math/BigInt.pm'; all_from 'lib/Math/BigInt.pm';
# As long as Math::BigInt defaults to using Math::BigInt::FastCalc as its # Required versions.
# library (back-end), we require it (see RT #49569).
requires 'perl' => 5.006002; requires 'perl' => 5.006002;
# See if old versions are installed, and if so, tell the user that
# upgrading them would make little fluffy kittens much happier:
my @checks;
check_minimum_version ('Math::BigInt::FastCalc' => 0.27);
check_minimum_version ('Math::BigInt::GMP' => 1.37);
check_minimum_version ('Math::BigInt::Pari' => 1.16);
check_minimum_version ('Math::BigRat' => 0.2602);
check_minimum_version ('bignum' => 0.22);
if (@checks > 0)
{
print <<"EOF";
**********************************************************************
Attention: After installing this package, you should also update:
EOF
for my $n (@checks)
{
my $name = $n->[0]; while (length($name) < 24) { $name .= ' '; }
print " $name to at least v$n->[1]\t (you have v$n->[2])\n";
}
print "\n";
sleep(5);
};
build_requires 'Test::More' => 0.62; build_requires 'Test::More' => 0.62;
install_as_core(); install_as_core();
...@@ -58,18 +31,3 @@ sign; ...@@ -58,18 +31,3 @@ sign;
WriteAll; WriteAll;
1; 1;
sub check_minimum_version
{
my ($module, $version) = @_;
my $v; eval " require $module; \$v = \$${module}::VERSION;";
recommends $module, $version;
# if the module is installed, but outdated, add it to the requirements
if (defined $v && $v < $version)
{
push @checks, [ $module, $version, $v ];
}
}
NEW 100644 → 100755
This lists only the changes for the current release over the last version, For the list of recent changes, see
since HISTORY is now quite big:
* fix #34459: bsqrt() breaks on floats with enough digits (Thanx Niko Tyni!)
* fix #35238: batan2() does not handle inf/-inf properly
* fix #35162: MBI segfault (as_number(Math::BigRat())), Thanx Zsbán Ambrus!)
* fix #34822: Which library is used? (Thanx Mark Overmeer!)
##############################################################################
Please have Math::BigFloat->bone->bexp->bdiv(0) big amounts of fun.
Tels <http://bloodgate.com/perl>
http://perl5.git.perl.org/perl.git/history/HEAD:/dist/Math-BigInt
This file contains message digests of all files listed in MANIFEST, This file contains message digests of all files listed in MANIFEST,
signed via the Module::Signature module, version 0.68. signed via the Module::Signature module, version 0.73.
To verify the content in this distribution, first make sure you have To verify the content in this distribution, first make sure you have
Module::Signature installed, then type: Module::Signature installed, then type:
...@@ -15,37 +15,36 @@ not run its Makefile.PL or Build.PL. ...@@ -15,37 +15,36 @@ not run its Makefile.PL or Build.PL.
Hash: SHA1 Hash: SHA1
SHA1 f6ef98e8f3f6a4f670d569f279ef5a3c05c16d0c BENCHMARK SHA1 f6ef98e8f3f6a4f670d569f279ef5a3c05c16d0c BENCHMARK
SHA1 89a3a97b2a4c5bb8919e51856a35b493cd5f9312 BUGS SHA1 d681b992c9e027633a59fbd52530805ee4e1621c BUGS
SHA1 be61886bedb5108610be7c03137c8d06c01b0b3b CHANGES SHA1 05f7c590cb00bfbea30be2aa5c6276e65ec095a1 CHANGES
SHA1 f27c8bd98e754f96c9825fa6ce9f1244c93bdbe6 CREDITS SHA1 f27c8bd98e754f96c9825fa6ce9f1244c93bdbe6 CREDITS
SHA1 bc2db74538d3acd53f71b5512a144fe18c253ecd GOALS SHA1 bc2db74538d3acd53f71b5512a144fe18c253ecd GOALS
SHA1 fe61299e80a1dca48fbaa33f0869e3238ec07c70 HISTORY SHA1 fe61299e80a1dca48fbaa33f0869e3238ec07c70 HISTORY
SHA1 c42565ad26cdf91502bacf19a4f7080e63c51fe2 INSTALL SHA1 c42565ad26cdf91502bacf19a4f7080e63c51fe2 INSTALL
SHA1 d6a6c30ee6d9ba6b9afab8bbf6a25e1b23c744e0 LICENSE SHA1 d6a6c30ee6d9ba6b9afab8bbf6a25e1b23c744e0 LICENSE
SHA1 8146d99998bd0e6c7861ab295b530d80e9f7d4c3 MANIFEST SHA1 43408348b400ef1d910a18feab394817e343cc86 MANIFEST
SHA1 9981edbeac4473adbe951034fc97afc2b9bf60a2 MANIFEST.SKIP SHA1 86df44fbe1ea7a68897113f0e327d0f0c25b91e3 MANIFEST.SKIP
SHA1 46ae142386712a790df63bac5cdaeaa2c4fe9960 META.json SHA1 1e0a1155f4e92ff56e10551124cc61ababc6f274 META.json
SHA1 a9bcc4f98112cc3368473950410f0ae6abf7d669 META.yml SHA1 994883693277174208f3ef92b7cb323e8ea0db66 META.yml
SHA1 ec08721a8e408016e79b6484362f7a8b03b41d7c Makefile.PL SHA1 ae1e2767f1988a537d4a64fc84a07587cbca2ef5 Makefile.PL
SHA1 2ec9bfda86bb2073e9423e6a86bb6956c06ebb2f NEW SHA1 a299af68b43c7cdb7c930275e007a219bcab8be9 NEW
SHA1 481f5827752d2100914db1eaeb60bf0bbd13529e README SHA1 481f5827752d2100914db1eaeb60bf0bbd13529e README
SHA1 f1500916b488220b707bc10a0388d7dbcfd52e99 TODO SHA1 f1500916b488220b707bc10a0388d7dbcfd52e99 TODO
SHA1 c2bbe82659480de8710b9e64a62d47b64dddd2d2 examples/1000.txt SHA1 c2bbe82659480de8710b9e64a62d47b64dddd2d2 examples/1000.txt
SHA1 fe55e27b4791656d36a6c9548280746de7003be5 examples/bigprimes.pl SHA1 fe55e27b4791656d36a6c9548280746de7003be5 examples/bigprimes.pl
SHA1 b57b118469a1a16e54d61206c5bd9077dbb2231a examples/hailstone.pl
SHA1 8ca42793d8769ec8d0928f11c30f38d96dd54efb examples/prime.pl SHA1 8ca42793d8769ec8d0928f11c30f38d96dd54efb examples/prime.pl
SHA1 7b4ae50ebac72d20761171c4c2b50c206344ea40 inc/Module/Install.pm SHA1 dc13ce0dbb488a5de81c3f6519ee31acda17397a inc/Module/Install.pm
SHA1 d9fe55a427fe2fd75b5029afeeaa61b592e07f79 inc/Module/Install/Base.pm SHA1 91c20cbda8ca41b4e8f9e0390faff635c2ebe839 inc/Module/Install/Base.pm
SHA1 62d3922826d9f89f20c185e7031ac8f028504745 inc/Module/Install/Can.pm SHA1 eaf50ccbacecb797f0527deb0221c8264f6c8bd8 inc/Module/Install/Can.pm
SHA1 dc809f64fb70a26b069a36f8d3d353d520dbb7e1 inc/Module/Install/Fetch.pm SHA1 363c8931cc183444907684b71d6a379e4fc8edcb inc/Module/Install/Fetch.pm
SHA1 73ab91490a628452cc140db72ef9d13a1326d211 inc/Module/Install/Makefile.pm SHA1 26ae1c0f5f352037b560414f216d7e3ac682f936 inc/Module/Install/Makefile.pm
SHA1 8ce3f2b414e4617e6233dd4ba10830f8c5d672ec inc/Module/Install/Metadata.pm SHA1 ff97eb025b44c343d026c2a56a73d50c65319e95 inc/Module/Install/Metadata.pm
SHA1 3b0acd2eeac93a0afe48120f5648f0db362e5bbf inc/Module/Install/Win32.pm SHA1 4c5ce519d404e242418f51dfe761287469e18e3a inc/Module/Install/Win32.pm
SHA1 f08924f051e623f8e09fa6a121993c4a9cf7d9eb inc/Module/Install/WriteAll.pm SHA1 47a52cf8719a283c0efa2edab0088b5d67e0f23a inc/Module/Install/WriteAll.pm
SHA1 d9078fbda98ca86682a317481f9a4886d66bf5d0 lib/Math/BigFloat.pm SHA1 a652347eaf88e4119e4f09c0e66bf2848e6a5def lib/Math/BigFloat.pm
SHA1 2e06f9606e5155e0d2b532092f211a978422a723 lib/Math/BigInt.pm SHA1 9e2a90ffbc9d895142cad22fbf7599746a5ba3cb lib/Math/BigInt.pm
SHA1 57296203789f7c32334a1196883fd2d8eb5b2880 lib/Math/BigInt/Calc.pm SHA1 a7f41aa75281e17489a2f6d15c267ab005fdd5c7 lib/Math/BigInt/Calc.pm
SHA1 d0ddfce78d6da2813aec2cac2735cb5a48715b02 lib/Math/BigInt/CalcEmu.pm SHA1 fc9464adbd4eb931f92811447333ddc6cf2b0a3b lib/Math/BigInt/CalcEmu.pm
SHA1 a2d393f9d265801f8ef022725d03f83b616b2fe1 t/00sig.t SHA1 a2d393f9d265801f8ef022725d03f83b616b2fe1 t/00sig.t
SHA1 32b73052135171974d5c522f0dee665a03dacdbd t/01load.t SHA1 32b73052135171974d5c522f0dee665a03dacdbd t/01load.t
SHA1 02ef05af53cb7378452590324bb21dfe61f44069 t/02pod.t SHA1 02ef05af53cb7378452590324bb21dfe61f44069 t/02pod.t
...@@ -56,15 +55,15 @@ SHA1 62deb0b9e3bf94aaf12745207efa3d858f3b878e t/Math/BigInt/Scalar.pm ...@@ -56,15 +55,15 @@ SHA1 62deb0b9e3bf94aaf12745207efa3d858f3b878e t/Math/BigInt/Scalar.pm
SHA1 27c1738a064e7f7bf91c762d411af447847c331c t/Math/BigInt/Subclass.pm SHA1 27c1738a064e7f7bf91c762d411af447847c331c t/Math/BigInt/Subclass.pm
SHA1 a2014803baec5dbef46235f83411f76efa0efea7 t/_e_math.t SHA1 a2014803baec5dbef46235f83411f76efa0efea7 t/_e_math.t
SHA1 0e725849a20e80bb1da796a7be40b69a958c8313 t/alias.inc SHA1 0e725849a20e80bb1da796a7be40b69a958c8313 t/alias.inc
SHA1 be61650d19d12797f0bd45d64a5dbae68f22f3ad t/bare_mbf.t SHA1 16d36aa915f9d6e86ec3e4f4e05ef26c6129399d t/bare_mbf.t
SHA1 fa55cd1412116a4f19c0580c46ce71b642de3831 t/bare_mbi.t SHA1 da1d61b785022c275d7d17f62aa6dfcdf1ddadaa t/bare_mbi.t
SHA1 97fb1db80aeb4ab007e2260d35329e149edf5e05 t/bare_mif.t SHA1 97fb1db80aeb4ab007e2260d35329e149edf5e05 t/bare_mif.t
SHA1 333a425247b4e276696210a6322b815a0f55f5ab t/big_pi_e.t SHA1 333a425247b4e276696210a6322b815a0f55f5ab t/big_pi_e.t
SHA1 d05514d6cae3afa4feb983d5467eaf9422aa546c t/bigfltpm.inc SHA1 e6bb2aea2f026016848db9ca96507c4ca4e3d265 t/bigfltpm.inc
SHA1 a8f364fea5e2993f5ae7bd3f8463024175d33e24 t/bigfltpm.t SHA1 9537400817c028f2282e3c085796ecbded0ccb66 t/bigfltpm.t
SHA1 b3ceebc429c05bce95347575d28348306dbcfcc8 t/bigintc.t SHA1 b3ceebc429c05bce95347575d28348306dbcfcc8 t/bigintc.t
SHA1 845e7daa3c6b2463a6fdc9218044975801547bb8 t/bigintpm.inc SHA1 d5d419d73cc52371ba3487895fd49f793ffe4d0c t/bigintpm.inc
SHA1 5c7e31a73f1827d08118f96cf31d5d4e792ab8c0 t/bigintpm.t SHA1 73ac3701a1116b1831c871153c836f618a60f4d7 t/bigintpm.t
SHA1 cb07d195c20eb306088eeacccc2c7475f267446c t/bigints.t SHA1 cb07d195c20eb306088eeacccc2c7475f267446c t/bigints.t
SHA1 5bdf82ef7085b97caa496bfc71ab1fbfe48ef9e8 t/biglog.t SHA1 5bdf82ef7085b97caa496bfc71ab1fbfe48ef9e8 t/biglog.t
SHA1 da260b6e02b220868fc7b4c0f87569299402fbf7 t/bigroot.t SHA1 da260b6e02b220868fc7b4c0f87569299402fbf7 t/bigroot.t
...@@ -93,12 +92,12 @@ SHA1 1bbe72733abd2f580f94b6a147672f7671260149 t/require.t ...@@ -93,12 +92,12 @@ SHA1 1bbe72733abd2f580f94b6a147672f7671260149 t/require.t
SHA1 ad6cc6fe4bb93ae78db4eb7dcb96c95024b963d2 t/round.t SHA1 ad6cc6fe4bb93ae78db4eb7dcb96c95024b963d2 t/round.t
SHA1 8201ea0035861736224992039bcc01d5bd72b778 t/rt-16221.t SHA1 8201ea0035861736224992039bcc01d5bd72b778 t/rt-16221.t
SHA1 9d51def046889bf20c6ac2a278f9b3f5f8e36025 t/sub_ali.t SHA1 9d51def046889bf20c6ac2a278f9b3f5f8e36025 t/sub_ali.t
SHA1 26e2d4b13a44eaa38141a7c119a2737ba10ae88d t/sub_mbf.t SHA1 3717645c60b533355006f3966f36c341efea24e7 t/sub_mbf.t
SHA1 8d56d489b86dbe487378d309e858df04bc17f9ed t/sub_mbi.t SHA1 3d03b0a0970abc3b27d8b0f20877213c7f3ea87d t/sub_mbi.t
SHA1 a9d994551c5ca127c11f5cdd1d8df1d93972c72c t/sub_mif.t SHA1 a9d994551c5ca127c11f5cdd1d8df1d93972c72c t/sub_mif.t
SHA1 22c563a6879c94ce7c8eb72c645f2e374837c34e t/trap.t SHA1 22c563a6879c94ce7c8eb72c645f2e374837c34e t/trap.t
SHA1 9438a430cebc43f4466b3d75662fe7dde577d3c7 t/upgrade.inc SHA1 888eb4cba20a5f809458a05d7a078493a5ff07d4 t/upgrade.inc
SHA1 6d12a4d44729cf096c4a22935484ffe72055aaf8 t/upgrade.t SHA1 3256f1ecdee8a1aafdcc6142362e815e565e3bff t/upgrade.t
SHA1 e9019081ff5c07957e45619010c62a54472d8508 t/upgrade2.t SHA1 e9019081ff5c07957e45619010c62a54472d8508 t/upgrade2.t
SHA1 49183118717b8b90e498b6d7b1ac0aa0e4d85894 t/upgradef.t SHA1 49183118717b8b90e498b6d7b1ac0aa0e4d85894 t/upgradef.t
SHA1 d58003dbb3ffb469dee56b8c93c5a6b3c353ddb7 t/use.t SHA1 d58003dbb3ffb469dee56b8c93c5a6b3c353ddb7 t/use.t
...@@ -107,11 +106,15 @@ SHA1 4959257dd52935cdfd17b132e11bcdb4e37752e9 t/use_lib2.t ...@@ -107,11 +106,15 @@ SHA1 4959257dd52935cdfd17b132e11bcdb4e37752e9 t/use_lib2.t
SHA1 29606835c9d63a19075003429b00947b922ef144 t/use_lib3.t SHA1 29606835c9d63a19075003429b00947b922ef144 t/use_lib3.t
SHA1 a5cc44a7e485828791696b2b27925e0d2855f883 t/use_lib4.t SHA1 a5cc44a7e485828791696b2b27925e0d2855f883 t/use_lib4.t
SHA1 0c5f496ed66b02d0e118763c91862d84e3fb5629 t/use_mbfw.t SHA1 0c5f496ed66b02d0e118763c91862d84e3fb5629 t/use_mbfw.t
SHA1 8e66591a9596ed344c09741a52ee5a54a4142dc6 t/with_sub.t SHA1 1d0fbaa1a15cd095c4499a70886a40f1a2a6c7a5 t/with_sub.t
-----BEGIN PGP SIGNATURE----- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin) Version: GnuPG v1
iEYEARECAAYFAk5jyfsACgkQVQvyyU1bcho3hwCeJAhTBN2Vu3AqJ3wt7b3TGyn1 iQEcBAEBAgAGBQJTPotCAAoJEGcmPl2fr166SGgH/RjNe/223B16WOfwNgm2lPhu
+NUAoNCUn23+323B5+4YaBtCwTqie9L0 MRB3+d6x9O8ceSF9aL9UlcDaoazgDik75zNSuJZrDt+wButpT0UwVzWx/UI8F1Fz
=wjVC D9f0OIngPyQXuyJM57/85UbJy1ApKIKs4+mzCb9NHHJwLxcXJq4R9rnVtOWkHC4a
RxIvtrnG911GmO0BqrRtYI15MQ90VzHCoAY3gID90s9yxmHEA5h6GCTn+MyCRE0e
ZDCecSlKO9nXkPTOxL574iAhOl71TQTe6wjcBZklw7BsZc+NP/WodV0RoKh7cE5g
hRnlGlqaLRr3a1y/9hTsfv3of5XTlqngwWcfVcHYVyQFPC6+cGf15hVe8K5D/ZE=
=7Uk/
-----END PGP SIGNATURE----- -----END PGP SIGNATURE-----
#!/usr/bin/perl -w
use lib '../lib';
use strict;
use Math::Big qw/hailstone/;
use Math::BigInt;
my $n = shift || 100;
$n = Math::BigInt->new($n);
my $x = Math::BigInt->new(1);
print "$n: ",scalar hailstone($n),"\n";
print "Hailstone numbers up to $n:\n";
while ($x < $n)
{
print "$x: ",scalar hailstone($x),"\n";
$x++;
}
...@@ -31,7 +31,7 @@ BEGIN { ...@@ -31,7 +31,7 @@ BEGIN {
# This is not enforced yet, but will be some time in the next few # This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom # releases once we can make sure it won't clash with custom
# Module::Install extensions. # Module::Install extensions.
$VERSION = '1.01'; $VERSION = '1.08';
# Storage for the pseudo-singleton # Storage for the pseudo-singleton
$MAIN = undef; $MAIN = undef;
...@@ -451,7 +451,7 @@ sub _version ($) { ...@@ -451,7 +451,7 @@ sub _version ($) {
} }
sub _cmp ($$) { sub _cmp ($$) {
_version($_[0]) <=> _version($_[1]); _version($_[1]) <=> _version($_[2]);
} }
# Cloned from Params::Util::_CLASS # Cloned from Params::Util::_CLASS
...@@ -467,4 +467,4 @@ sub _CLASS ($) { ...@@ -467,4 +467,4 @@ sub _CLASS ($) {
1; 1;
# Copyright 2008 - 2011 Adam Kennedy. # Copyright 2008 - 2012 Adam Kennedy.
...@@ -4,7 +4,7 @@ package Module::Install::Base; ...@@ -4,7 +4,7 @@ package Module::Install::Base;
use strict 'vars'; use strict 'vars';
use vars qw{$VERSION}; use vars qw{$VERSION};
BEGIN { BEGIN {
$VERSION = '1.01'; $VERSION = '1.08';
} }
# Suspend handler for "redefined" warnings # Suspend handler for "redefined" warnings
......
...@@ -3,13 +3,12 @@ package Module::Install::Can; ...@@ -3,13 +3,12 @@ package Module::Install::Can;
use strict; use strict;
use Config (); use Config ();
use File::Spec ();
use ExtUtils::MakeMaker (); use ExtUtils::MakeMaker ();
use Module::Install::Base (); use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE}; use vars qw{$VERSION @ISA $ISCORE};
BEGIN { BEGIN {
$VERSION = '1.01'; $VERSION = '1.08';
@ISA = 'Module::Install::Base'; @ISA = 'Module::Install::Base';
$ISCORE = 1; $ISCORE = 1;
} }
...@@ -29,7 +28,7 @@ sub can_use { ...@@ -29,7 +28,7 @@ sub can_use {
eval { require $mod; $pkg->VERSION($ver || 0); 1 }; eval { require $mod; $pkg->VERSION($ver || 0); 1 };
} }
# check if we can run some command # Check if we can run some command
sub can_run { sub can_run {
my ($self, $cmd) = @_; my ($self, $cmd) = @_;
...@@ -38,14 +37,88 @@ sub can_run { ...@@ -38,14 +37,88 @@ sub can_run {
for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') { for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
next if $dir eq ''; next if $dir eq '';
my $abs = File::Spec->catfile($dir, $_[1]); require File::Spec;
my $abs = File::Spec->catfile($dir, $cmd);
return $abs if (-x $abs or $abs = MM->maybe_command($abs)); return $abs if (-x $abs or $abs = MM->maybe_command($abs));
} }
return; return;
} }
# can we locate a (the) C compiler # Can our C compiler environment build XS files
sub can_xs {
my $self = shift;
# Ensure we have the CBuilder module
$self->configure_requires( 'ExtUtils::CBuilder' => 0.27 );
# Do we have the configure_requires checker?
local $@;
eval "require ExtUtils::CBuilder;";
if ( $@ ) {
# They don't obey configure_requires, so it is
# someone old and delicate. Try to avoid hurting
# them by falling back to an older simpler test.
return $self->can_cc();
}
# Do we have a working C compiler
my $builder = ExtUtils::CBuilder->new(
quiet => 1,
);
unless ( $builder->have_compiler ) {
# No working C compiler
return 0;
}
# Write a C file representative of what XS becomes
require File::Temp;
my ( $FH, $tmpfile ) = File::Temp::tempfile(
"compilexs-XXXXX",
SUFFIX => '.c',
);
binmode $FH;
print $FH <<'END_C';
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
int main(int argc, char **argv) {
return 0;
}
int boot_sanexs() {
return 1;
}
END_C
close $FH;
# Can the C compiler access the same headers XS does
my @libs = ();
my $object = undef;
eval {
local $^W = 0;
$object = $builder->compile(
source => $tmpfile,
);
@libs = $builder->link(
objects => $object,
module_name => 'sanexs',
);
};
my $result = $@ ? 0 : 1;
# Clean up all the build files
foreach ( $tmpfile, $object, @libs ) {
next unless defined $_;
1 while unlink;
}
return $result;
}
# Can we locate a (the) C compiler
sub can_cc { sub can_cc {
my $self = shift; my $self = shift;
my @chunks = split(/ /, $Config::Config{cc}) or return; my @chunks = split(/ /, $Config::Config{cc}) or return;
...@@ -78,4 +151,4 @@ if ( $^O eq 'cygwin' ) { ...@@ -78,4 +151,4 @@ if ( $^O eq 'cygwin' ) {
__END__ __END__
#line 156 #line 236
...@@ -6,7 +6,7 @@ use Module::Install::Base (); ...@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE}; use vars qw{$VERSION @ISA $ISCORE};
BEGIN { BEGIN {
$VERSION = '1.01'; $VERSION = '1.08';
@ISA = 'Module::Install::Base'; @ISA = 'Module::Install::Base';
$ISCORE = 1; $ISCORE = 1;
} }
......
...@@ -8,7 +8,7 @@ use Fcntl qw/:flock :seek/; ...@@ -8,7 +8,7 @@ use Fcntl qw/:flock :seek/;
use vars qw{$VERSION @ISA $ISCORE}; use vars qw{$VERSION @ISA $ISCORE};
BEGIN { BEGIN {
$VERSION = '1.01'; $VERSION = '1.08';
@ISA = 'Module::Install::Base'; @ISA = 'Module::Install::Base';
$ISCORE = 1; $ISCORE = 1;
} }
...@@ -215,18 +215,22 @@ sub write { ...@@ -215,18 +215,22 @@ sub write {
require ExtUtils::MakeMaker; require ExtUtils::MakeMaker;
if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) { if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) {
# MakeMaker can complain about module versions that include # This previous attempted to inherit the version of
# an underscore, even though its own version may contain one! # ExtUtils::MakeMaker in use by the module author, but this
# Hence the funny regexp to get rid of it. See RT #35800 # was found to be untenable as some authors build releases
# for details. # using future dev versions of EU:MM that nobody else has.
my $v = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/; # Instead, #toolchain suggests we use 6.59 which is the most
$self->build_requires( 'ExtUtils::MakeMaker' => $v ); # stable version on CPAN at time of writing and is, to quote
$self->configure_requires( 'ExtUtils::MakeMaker' => $v ); # ribasushi, "not terminally fucked, > and tested enough".
# TODO: We will now need to maintain this over time to push
# the version up as new versions are released.
$self->build_requires( 'ExtUtils::MakeMaker' => 6.59 );
$self->configure_requires( 'ExtUtils::MakeMaker' => 6.59 );
} else { } else {
# Allow legacy-compatibility with 5.005 by depending on the # Allow legacy-compatibility with 5.005 by depending on the
# most recent EU:MM that supported 5.005. # most recent EU:MM that supported 5.005.
$self->build_requires( 'ExtUtils::MakeMaker' => 6.42 ); $self->build_requires( 'ExtUtils::MakeMaker' => 6.36 );
$self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 ); $self->configure_requires( 'ExtUtils::MakeMaker' => 6.36 );
} }
# Generate the MakeMaker params # Generate the MakeMaker params
...@@ -241,7 +245,6 @@ in a module, and provide its file path via 'version_from' (or ...@@ -241,7 +245,6 @@ in a module, and provide its file path via 'version_from' (or
'all_from' if you prefer) in Makefile.PL. 'all_from' if you prefer) in Makefile.PL.
EOT EOT
$DB::single = 1;
if ( $self->tests ) { if ( $self->tests ) {
my @tests = split ' ', $self->tests; my @tests = split ' ', $self->tests;
my %seen; my %seen;
...@@ -412,4 +415,4 @@ sub postamble { ...@@ -412,4 +415,4 @@ sub postamble {
__END__ __END__
#line 541 #line 544
...@@ -6,7 +6,7 @@ use Module::Install::Base (); ...@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE}; use vars qw{$VERSION @ISA $ISCORE};
BEGIN { BEGIN {
$VERSION = '1.01'; $VERSION = '1.08';
@ISA = 'Module::Install::Base'; @ISA = 'Module::Install::Base';
$ISCORE = 1; $ISCORE = 1;
} }
...@@ -152,14 +152,20 @@ sub install_as_vendor { $_[0]->installdirs('vendor') } ...@@ -152,14 +152,20 @@ sub install_as_vendor { $_[0]->installdirs('vendor') }
sub dynamic_config { sub dynamic_config {
my $self = shift; my $self = shift;
unless ( @_ ) { my $value = @_ ? shift : 1;
warn "You MUST provide an explicit true/false value to dynamic_config\n"; if ( $self->{values}->{dynamic_config} ) {
return $self; # Once dynamic we never change to static, for safety
return 0;
} }
$self->{values}->{dynamic_config} = $_[0] ? 1 : 0; $self->{values}->{dynamic_config} = $value ? 1 : 0;
return 1; return 1;
} }
# Convenience command
sub static_config {
shift->dynamic_config(0);
}
sub perl_version { sub perl_version {
my $self = shift; my $self = shift;
return $self->{values}->{perl_version} unless @_; return $self->{values}->{perl_version} unless @_;
...@@ -170,7 +176,7 @@ sub perl_version { ...@@ -170,7 +176,7 @@ sub perl_version {
# Normalize the version # Normalize the version
$version = $self->_perl_version($version); $version = $self->_perl_version($version);
# We don't support the reall old versions # We don't support the really old versions
unless ( $version >= 5.005 ) { unless ( $version >= 5.005 ) {
die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n"; die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n";
} }
...@@ -582,7 +588,7 @@ sub bugtracker_from { ...@@ -582,7 +588,7 @@ sub bugtracker_from {
sub requires_from { sub requires_from {
my $self = shift; my $self = shift;
my $content = Module::Install::_readperl($_[0]); my $content = Module::Install::_readperl($_[0]);
my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg; my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+(v?[\d\.]+)/mg;
while ( @requires ) { while ( @requires ) {
my $module = shift @requires; my $module = shift @requires;
my $version = shift @requires; my $version = shift @requires;
......
...@@ -6,7 +6,7 @@ use Module::Install::Base (); ...@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE}; use vars qw{$VERSION @ISA $ISCORE};
BEGIN { BEGIN {
$VERSION = '1.01'; $VERSION = '1.08';
@ISA = 'Module::Install::Base'; @ISA = 'Module::Install::Base';
$ISCORE = 1; $ISCORE = 1;
} }
......
...@@ -6,7 +6,7 @@ use Module::Install::Base (); ...@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE}; use vars qw{$VERSION @ISA $ISCORE};
BEGIN { BEGIN {
$VERSION = '1.01'; $VERSION = '1.08';
@ISA = qw{Module::Install::Base};