Subject: | Docs mismatch with upgrade |
In the docs for BigInt upgrade/downgrade, it says:
---
Set/get the class for downgrade/upgrade operations. Thuis is used for
instance by bignum. The defaults are '', thus the following operation will
create a BigInt, not a BigFloat:
---
The default isn't '', but undef, which is important for people who want to
disable auto-upgrading:
use Math::BigInt;
my $value = Math::BigInt->new('18446744073709551615');
$value->upgrade(undef); # make sure bdiv still gives us a BigInt
my ($quotient, $remainder) = $value->bdiv(256);
Using '' will error out on bdiv with:
Can't call method "new" without a package or object reference at
Math::BigInt line 1716.