Skip Menu |

This queue is for tickets about the Math-BigRat CPAN distribution.

Report information
The Basics
Id: 94881
Status: resolved
Priority: 0/
Queue: Math-BigRat

People
Owner: Nobody in particular
Requestors: peter.john.acklam [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 0.10
  • 0.11
  • 0.12
  • 0.13
  • 0.14
  • 0.15
  • 0.16
  • 0.17
  • 0.18
  • 0.19
  • 0.20
  • 0.21
  • 0.22
  • 0.23
  • 0.24
  • 0.25
  • 0.26
  • 0.2602
  • 0.2606
Fixed in: 0.260803



Subject: Math::BigRat -> bint() gives warning
$ perl -MMath::BigRat -wle 'print Math::BigRat -> new("22/7") -> bint()' Use of uninitialized value in string eq at /usr/lib/perl5/5.14/Math/BigFloat.pm line 3452. 22/7 The bint() method should either not be supported or it should work properly. I suspect this is yet another bug caused by Math::BigRat being a subclass of Math::BigFloat and inherinting methods from its parent class. Both Math::BigInt, Math::BigFloat, and Math::BigRat ought to be a subclass of a common, virtual parent class -- like, e.g., IO::Handle is for the various IO handle subclasses.
Math::BigRat doesn't have bint(), but Math::BigRat isa Math::BigFloat, and Math::BigFloat has bint(), so that method is called. However, a Math::BigFloat object has a different internal data structure than a Math::BigRat object, so in this case, Math::BigFloat -> bint() is looking for a hash key that doesn't exist for Math::BigRat objects.
Math::BigRat -> bint() implemented in version 0.260803.