In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/cd293174fae5fb311f4d4d91bc9aad399a3f9954?hp=70002ee213a623f51a8f81b846487b2e71cb495f>
- Log ----------------------------------------------------------------- commit cd293174fae5fb311f4d4d91bc9aad399a3f9954 Author: Tony Cook <t...@develop-help.com> Date: Wed Jun 25 14:53:50 2014 +1000 bump dist/Math-BigInt/ $VERSIONS to 1.9996 M dist/Math-BigInt/lib/Math/BigFloat.pm M dist/Math-BigInt/lib/Math/BigInt.pm M dist/Math-BigInt/lib/Math/BigInt/Calc.pm M dist/Math-BigInt/lib/Math/BigInt/CalcEmu.pm commit 0f9d285877728dbba8969165d18f9a8b12ff68fc Author: Peter John Acklam <pjack...@online.no> Date: Sun Jun 15 18:46:52 2014 +0200 CPAN RT 96254 and 96329: Correct the handling of subclasses. Don't check for an exact class name; trust inheritance. M dist/Math-BigInt/lib/Math/BigInt.pm ----------------------------------------------------------------------- Summary of changes: dist/Math-BigInt/lib/Math/BigFloat.pm | 2 +- dist/Math-BigInt/lib/Math/BigInt.pm | 20 +++++++------------- dist/Math-BigInt/lib/Math/BigInt/Calc.pm | 2 +- dist/Math-BigInt/lib/Math/BigInt/CalcEmu.pm | 2 +- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/dist/Math-BigInt/lib/Math/BigFloat.pm b/dist/Math-BigInt/lib/Math/BigFloat.pm index 8614bba..e022949 100644 --- a/dist/Math-BigInt/lib/Math/BigFloat.pm +++ b/dist/Math-BigInt/lib/Math/BigFloat.pm @@ -12,7 +12,7 @@ package Math::BigFloat; # _a : accuracy # _p : precision -$VERSION = '1.9994'; +$VERSION = '1.9996'; require 5.006002; require Exporter; diff --git a/dist/Math-BigInt/lib/Math/BigInt.pm b/dist/Math-BigInt/lib/Math/BigInt.pm index 7dd3d41..69fd320 100644 --- a/dist/Math-BigInt/lib/Math/BigInt.pm +++ b/dist/Math-BigInt/lib/Math/BigInt.pm @@ -18,7 +18,7 @@ package Math::BigInt; my $class = "Math::BigInt"; use 5.006002; -$VERSION = '1.9995'; +$VERSION = '1.9996'; @ISA = qw(Exporter); @EXPORT_OK = qw(objectify bgcd blcm); @@ -2675,28 +2675,22 @@ sub objectify { for my $i (1 .. $count) { my $ref = ref $a[$i]; - # If it is an object of the right class, all is fine. - - if ($ref eq $a[0]) { - next; - } - - # Don't do anything with undefs. + # Perl scalars are fed to the appropriate constructor. - unless (defined($a[$i])) { + unless ($ref) { + $a[$i] = $a[0] -> new($a[$i]); next; } - # Perl scalars are fed to the appropriate constructor. + # If it is an object of the right class, all is fine. - unless ($ref) { - $a[$i] = $a[0] -> new($a[$i]); + if ($ref -> isa($a[0])) { next; } # Upgrading is OK, so skip further tests if the argument is upgraded. - if (defined $up && $ref eq $up) { + if (defined $up && $ref -> isa($up)) { next; } diff --git a/dist/Math-BigInt/lib/Math/BigInt/Calc.pm b/dist/Math-BigInt/lib/Math/BigInt/Calc.pm index 97815f7..588e2ac 100644 --- a/dist/Math-BigInt/lib/Math/BigInt/Calc.pm +++ b/dist/Math-BigInt/lib/Math/BigInt/Calc.pm @@ -4,7 +4,7 @@ use 5.006002; use strict; # use warnings; # do not use warnings for older Perls -our $VERSION = '1.9994'; +our $VERSION = '1.9996'; # Package to store unsigned big integers in decimal and do math with them diff --git a/dist/Math-BigInt/lib/Math/BigInt/CalcEmu.pm b/dist/Math-BigInt/lib/Math/BigInt/CalcEmu.pm index 544455f..1a83f09 100644 --- a/dist/Math-BigInt/lib/Math/BigInt/CalcEmu.pm +++ b/dist/Math-BigInt/lib/Math/BigInt/CalcEmu.pm @@ -5,7 +5,7 @@ use strict; # use warnings; # do not use warnings for older Perls use vars qw/$VERSION/; -$VERSION = '1.9994'; +$VERSION = '1.9996'; package Math::BigInt; -- Perl5 Master Repository