[libmath-prime-util-perl] 76/181: Workaround for 5.6.2 PP

Partha P. Mukherjee ppm-guest at moszumanska.debian.org
Thu May 21 18:51:08 UTC 2015


This is an automated email from the git hooks/post-receive script.

ppm-guest pushed a commit to annotated tag v0.36
in repository libmath-prime-util-perl.

commit 91f7c613ed7ea169508754a97b76b0c34229d74a
Author: Dana Jacobsen <dana at acm.org>
Date:   Tue Dec 31 02:36:57 2013 -0800

    Workaround for 5.6.2 PP
---
 lib/Math/Prime/Util.pm    | 2 +-
 lib/Math/Prime/Util/PP.pm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/Math/Prime/Util.pm b/lib/Math/Prime/Util.pm
index 44c5b4d..fd63fc0 100644
--- a/lib/Math/Prime/Util.pm
+++ b/lib/Math/Prime/Util.pm
@@ -231,7 +231,7 @@ sub _validate_positive_integer {
   croak "Parameter '$n' must be <= $max" if defined $max && $n > $max;
 
   $_[0] = Math::BigInt->new("$_[0]") unless ref($_[0]) eq 'Math::BigInt';
-  if ($_[0]->bacmp(''.~0) <= 0) {
+  if ($_[0]->bacmp(''.~0) <= 0 && $] >= 5.008) {
     $_[0] = int($_[0]->bstr);
   } else {
     $_[0]->upgrade(undef) if $_[0]->upgrade();  # Stop BigFloat upgrade
diff --git a/lib/Math/Prime/Util/PP.pm b/lib/Math/Prime/Util/PP.pm
index 4ae17b2..031d6ab 100644
--- a/lib/Math/Prime/Util/PP.pm
+++ b/lib/Math/Prime/Util/PP.pm
@@ -94,7 +94,7 @@ sub _validate_positive_integer {
   croak "Parameter '$n' must be >= $min" if defined $min && $n < $min;
   croak "Parameter '$n' must be <= $max" if defined $max && $n > $max;
   $_[0] = Math::BigInt->new("$_[0]") unless ref($_[0]) eq 'Math::BigInt';
-  if ($_[0]->bacmp(''.~0) <= 0) {
+  if ($_[0]->bacmp(''.~0) <= 0 && $] >= 5.008) {
     $_[0] = int($_[0]->bstr);
   } else {
     # Stop BigFloat upgrade

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmath-prime-util-perl.git



More information about the Pkg-perl-cvs-commits mailing list