summaryrefslogtreecommitdiff
path: root/regen
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2018-07-07 11:29:12 -0600
committerKarl Williamson <khw@cpan.org>2018-07-07 12:42:13 -0600
commit00d503c441212052333efea48fdca1499869a60c (patch)
tree2090bd26b3958444870e45710eac0d52cdaa6cdf /regen
parent5ae55d32c71cec423629c7ce1a4a7deb9ae48523 (diff)
downloadperl-00d503c441212052333efea48fdca1499869a60c.tar.gz
regen/mph.pl: Use 'bignum'
Commit 72196ef94b98987bb277d8bf6db6efaacd624c3c changed to 'use integer' in one function. But this was not sufficient to work on a 32 bit system. I tried a global 'use integer', which also didn't work; then a global 'use bigint', which causes the program to not loop and it generates usable data, but this causes a floating point statistic that is included to be printed as 0. The solution is to 'use bignum' instead. See the thread beginning at http://nntp.perl.org/group/perl.perl5.porters/251393
Diffstat (limited to 'regen')
-rw-r--r--regen/mph.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/regen/mph.pl b/regen/mph.pl
index 06d2ccf471..5ed392a1ea 100644
--- a/regen/mph.pl
+++ b/regen/mph.pl
@@ -4,6 +4,7 @@ use warnings;
use Data::Dumper;
use Carp;
use Text::Wrap;
+use bignum; # Otherwise fails on 32-bit systems
my $DEBUG= 0;
my $RSHIFT= 8;
@@ -11,7 +12,6 @@ my $FNV_CONST= 16777619;
sub _fnv {
my ($key, $seed)= @_;
- use integer;
my $hash = 0+$seed;
foreach my $char (split //, $key) {
$hash = $hash ^ ord($char);