Giter VIP home page Giter VIP logo

math-base36's People

Contributors

bricas avatar chizmw avatar zakame avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

chizmw zakame

math-base36's Issues

Broken support of encoding implicit big int since version 0.09

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~

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.