Skip Menu |

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

Report information
The Basics
Id: 15712
Status: resolved
Priority: 0/
Queue: Math-Base36

People
Owner: Nobody in particular
Requestors: lallip [...] cs.rpi.edu
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: Returns 2nd..nth characters of decoded string only
Math-Base36-0.02 This is perl, v5.6.1 built for sun4-solaris SunOS sunnybt1 5.8 Generic_117350-23 sun4u sparc SUNW,Ultra-4 The decode_base36 function seems to only return the 2nd..nth digits of the decoded string. This results in incorrect results from this function, and causes tests 3 and 4 to fail. Additionally, the fifth test fails due to (I believe) overflow. Changing the test from a comparison of the number 808281277464764060643139600456536293375 to a comparison of the object Math::BigInt->new('808281277464764060643139600456536293375') makes the test pass. Attached is a diff of the Base36.pm file, repairing the return value of the decode_base36 function.
33c33 < return(substr($t,1)); --- > return $t;