[libmath-prime-util-perl] 11/15: Make sure non-XS can use forprimes properly

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


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

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

commit eca9e7db56f0171a78cea02de6740b5b9e7c9f47
Author: Dana Jacobsen <dana at acm.org>
Date:   Wed May 29 23:47:10 2013 -0700

    Make sure non-XS can use forprimes properly
---
 README                    | 2 +-
 lib/Math/Prime/Util.pm    | 8 ++++----
 lib/Math/Prime/Util/PP.pm | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/README b/README
index fa31bfc..ff215d8 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-Math::Prime::Util version 0.28
+Math::Prime::Util version 0.29
 
 A set of utilities related to prime numbers.  These include multiple sieving
 methods, is_prime, prime_count, nth_prime, approximations and bounds for
diff --git a/lib/Math/Prime/Util.pm b/lib/Math/Prime/Util.pm
index 3f8ad74..d9b5d93 100644
--- a/lib/Math/Prime/Util.pm
+++ b/lib/Math/Prime/Util.pm
@@ -6,7 +6,7 @@ use Bytes::Random::Secure;
 
 BEGIN {
   $Math::Prime::Util::AUTHORITY = 'cpan:DANAJ';
-  $Math::Prime::Util::VERSION = '0.28';
+  $Math::Prime::Util::VERSION = '0.29';
 }
 
 # parent is cleaner, and in the Perl 5.10.1 / 5.12.0 core, but not earlier.
@@ -94,7 +94,7 @@ BEGIN {
     *is_prime      = \&Math::Prime::Util::_generic_is_prime;
     *next_prime    = \&Math::Prime::Util::_generic_next_prime;
     *prev_prime    = \&Math::Prime::Util::_generic_prev_prime;
-    *forprimes     = \&Math::Prime::Util::_generic_forprimes;
+    *forprimes     = sub (&$;$) { _generic_forprimes(@_); }; ## no critic qw(ProhibitSubroutinePrototypes)
 
     *_prime_memfreeall = \&Math::Prime::Util::PP::_prime_memfreeall;
     *prime_memfree  = \&Math::Prime::Util::PP::prime_memfree;
@@ -1059,7 +1059,7 @@ sub primorial {
       $pn = int( Math::Prime::Util::GMP::primorial($n) );
     }
   } else {
-    forprimes { $pn *= $_ } $n;
+    forprimes(sub { $pn *= $_ }, $n);
   }
   return $pn;
 }
@@ -2407,7 +2407,7 @@ Math::Prime::Util - Utilities related to prime numbers, including fast sieves an
 
 =head1 VERSION
 
-Version 0.28
+Version 0.29
 
 
 =head1 SYNOPSIS
diff --git a/lib/Math/Prime/Util/PP.pm b/lib/Math/Prime/Util/PP.pm
index adcddf6..530e211 100644
--- a/lib/Math/Prime/Util/PP.pm
+++ b/lib/Math/Prime/Util/PP.pm
@@ -5,7 +5,7 @@ use Carp qw/carp croak confess/;
 
 BEGIN {
   $Math::Prime::Util::PP::AUTHORITY = 'cpan:DANAJ';
-  $Math::Prime::Util::PP::VERSION = '0.27';
+  $Math::Prime::Util::PP::VERSION = '0.29';
 }
 
 # The Pure Perl versions of all the Math::Prime::Util routines.
@@ -2561,7 +2561,7 @@ Math::Prime::Util::PP - Pure Perl version of Math::Prime::Util
 
 =head1 VERSION
 
-Version 0.27
+Version 0.29
 
 
 =head1 SYNOPSIS

-- 
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