bricas / math-base36 Goto Github PK
View Code? Open in Web Editor NEWEncoding and decoding of base36 strings
Home Page: http://metacpan.org/release/Math-Base36/
Encoding and decoding of base36 strings
Home Page: http://metacpan.org/release/Math-Base36/
We use Math-Base36 in our company, and recently we found that starting from version 0.09, the module lost support for encoding implicit big int because of below change (see a1faa1d) in lib/Math/Base36.pm
-use Math::BigInt qw(:constant);
+use Math::BigInt ();
So, if we add a couple of tests into 02-basic.t as below,
{
my $num = '808281277464764060643139600456536293375';
my $b36 = 'ZZZZZZZZZZZZZZZZZZZZZZZZZ';
is( decode_base36( $b36 ), $num, 'decode large number (implicit bigint)' );
is( encode_base36( $num ), $b36, 'encode large number (implicit bigint)' );
}
With older versions they are able to pass, but with >=0.09 it would fail like,
t/02-basic.t ......... 1/35
# Failed test 'encode large number (implicit bigint)'
# at t/02-basic.t line 50.
# got: 'ZZZZZZZZZY84KSWGSWO4KSW8O'
# expected: 'ZZZZZZZZZZZZZZZZZZZZZZZZZ'
# Looks like you failed 1 test of 35.
t/02-basic.t ......... Dubious, test returned 1 (wstat 256, 0x100)
This issue caused our code to break when using a recent version of Math::Base36. And we would hope to get back that :constant
Thanks~
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.