Subject: | Can no longer subtract an undefined value. |
As elegantly reported here:
http://lists.opensuse.org/opensuse-bugs/2012-06/msg01204.html
You can no longer subtract an undefined value.
# perl -e 'use bigint; 5 + $x;'
# perl -e 'use bigint; $x - 5;'
# perl -e 'use bigint; 5 - $x;'
Can't call method "is_zero" on an undefined value at
/usr/lib/perl5/5.16.0/Math/BigInt.pm line 1200.
I did a little experimenting of my own in BigInt.pm and by reverting
only sub objectify to my previous version 1.993
The I narrowed it down to this tiny patch:
--- BigInt-b.pm 2012-10-12 21:55:30.102263313 -0700
+++ BigInt.pm 2012-10-12 22:42:33.163394429 -0700
@@ -2669,9 +2669,9 @@
# Don't do anything with undefs.
- unless (defined($a[$i])) {
- next;
- }
+ #unless (defined($a[$i])) {
+ # next;
+ #}
# Perl scalars are fed to the appropriate constructor.
Which then gives me
perl -e 'use bigint; print 5 - $x;'
5
As expected.
PS
Thanks for your exelent work!