Skip Menu |

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

Report information
The Basics
Id: 62789
Status: rejected
Priority: 0/
Queue: Math-Base36

People
Owner: Nobody in particular
Requestors: jbd [...] codemeta.com
Cc:
AdminCc:

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



Subject: Math::Base36::decode_base36 -- invalid base 36 digit: '0'
Date: Sat, 06 Nov 2010 21:44:22 -0400
To: bug-Math-Base36 [...] rt.cpan.org
From: Bruce Dawson <jbd [...] codemeta.com>
**This is perl, v5.8.8 built for x86_64-linux-gnu-thread-multi Date of Base36.pm file: 2002-02-17 (Couldn't find a version number) OS: Linux river 2.6.24-23-generic #1 SMP Thu Nov 27 18:13:46 UTC 2008 x86_64 GNU/Linux The following program produces an error: $ ../bin/uuid-encode 1289093634 is LBHR0I Math::Base36::decode_base36 -- invalid base 36 digit: '0' at ../bin/uuid-encode line 11 ---------------------------- #!/usr/bin/perl use Math::Base36 ':all'; my $p = $ARGV[0]; if ($p eq "") { $p = time; } my $t = encode_base36($p); print $p . " is " . $t . "\n"; my $nt = decode_base36($t); print "Which equates to " . scalar(localtime($nt)) . "\n";
Subject: Re: [rt.cpan.org #62789] AutoReply: Math::Base36::decode_base36 -- invalid base 36 digit: '0'
Date: Sun, 07 Nov 2010 08:26:29 -0500
To: bug-Math-Base36 [...] rt.cpan.org
From: Bruce Dawson <jbd [...] codemeta.com>
I've applied some patches that get it to pass all but the Bignum test (test 5): $ diff Base36.pm.orig Base36.pm 22c22 < my $_digits = '0123456789ABCDEFGHIJKLMNOPQRSTUVWZYX'; --- Show quoted text
> my $_digits = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
29c29 < croak __PACKAGE__ ."::decode_base36 -- invalid base 36 digit: '$_'" unless index($_digits,$_) > 0; --- Show quoted text
> croak __PACKAGE__ ."::decode_base36 -- invalid base 36 digit:
'$_'" unless index($_digits,$_) >= 0; 33c33 < return(substr($t,1)); --- Show quoted text
> return $t;
$ perl test.pl 1..5 ok 1 ok 2 ok 3 ok 4 not ok 5 --Bruce On 11/06/2010 09:44 PM, Bugs in Math-Base36 via RT wrote: Show quoted text
> **This is perl, v5.8.8 built for x86_64-linux-gnu-thread-multi > Date of Base36.pm file: 2002-02-17 (Couldn't find a version number) > OS: Linux river 2.6.24-23-generic #1 SMP Thu Nov 27 18:13:46 UTC 2008 > x86_64 GNU/Linux > > The following program produces an error: > > $ ../bin/uuid-encode > 1289093634 is LBHR0I > Math::Base36::decode_base36 -- invalid base 36 digit: '0' at > ../bin/uuid-encode line 11 > > ---------------------------- > > #!/usr/bin/perl > > use Math::Base36 ':all'; > > my $p = $ARGV[0]; > if ($p eq "") { > $p = time; > } > my $t = encode_base36($p); > print $p . " is " . $t . "\n"; > my $nt = decode_base36($t); > print "Which equates to " . scalar(localtime($nt)) . "\n"; >
It looks like you're using an old version of the module. Please upgrade to the latest version (0.07 as of this writing) and try your code again. I will mark this bug as "rejected" -- should your issues persist after the upgrade, either re-open the bug or file a new one. Cheers.
Subject: Re: [rt.cpan.org #62789] Math::Base36::decode_base36 -- invalid base 36 digit: '0'
Date: Mon, 08 Nov 2010 08:16:04 -0500
To: bug-Math-Base36 [...] rt.cpan.org
From: Bruce Dawson <jbd [...] codemeta.com>
Odd. That's what was offered for download by cpan.org just a day or two earlier. I'll try the latest release and see what happens. --Bruce On 11/08/2010 07:28 AM, Brian Cassidy via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=62789 > > > It looks like you're using an old version of the module. Please upgrade > to the latest version (0.07 as of this writing) and try your code again. > > I will mark this bug as "rejected" -- should your issues persist after > the upgrade, either re-open the bug or file a new one. > > Cheers.
Subject: Re: [rt.cpan.org #62789] Math::Base36::decode_base36 -- invalid base 36 digit: '0'
Date: Mon, 08 Nov 2010 08:23:55 -0500
To: bug-Math-Base36 [...] rt.cpan.org
From: Bruce Dawson <jbd [...] codemeta.com>
Looks like 0.07 works fine! Thanks for updating the distribution. --Bruce
You're very welcome. :)