Skip Menu |

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

Report information
The Basics
Id: 128489
Status: rejected
Priority: 0/
Queue: Math-Base-Convert

People
Owner: Nobody in particular
Requestors: randolf [...] richardson.tw
Cc:
AdminCc:

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



CC: Randolf Richardson <randolf [...] richardson.tw>
Subject: Added "d11" (a specialized base 11) type to Math::Base::Convert
Date: Tue, 12 Feb 2019 13:03:36 -0800
To: bug-Math-Base-Convert [...] rt.cpan.org
From: "Randolf Richardson" <randolf [...] richardson.tw>
See attached. I added the following to the "Changes" file to document the changes, and incremented the version from 0.11 to 0.12 (I hope this will be okay as this is my first CPAN contribution): 0.12 Tue Feb 12 12:12:12 PDT 2019 added "d11" type which is base 11 with "012345679." (by Randolf Richardson <randolf@richardson.tw>) which is used to support the conversion of numbers that contain periods to types such as Base 62 for uses such as human-friendly URL encoding (the period can serve as a delimiter in some interesting cases, and support for multiple periods means complex version numbers can also be encoded/decoded accurately); adding the "d11" type required adding code to Convert.pm and Bases.pm. Thank you.

Message body not shown because it is not plain text.

My previous reply was not very specific. So here are the specifics. This is a use case issue not a reason to patch. You have defined a new 'basemap'. Math::Base::Convert can use any base map of any size. my d11 => ['0'..'9', '.'] $converted = cnv($number,dec,$d11); Will magically convert decimal to base d11. Simple as that or if you do it a lot and wish to save CPU cycles the "prepare" it. use Math::Base::Convert qw(:all); my $bc = new Math::Base::Convert(dec,$d11); my $converted = $bc->cnv($number); On Tue Feb 12 16:09:10 2019, randolf@richardson.tw wrote: Show quoted text
> See attached. I added the following to the "Changes" file to > document the changes, and incremented the version from 0.11 to 0.12 > (I hope this will be okay as this is my first CPAN contribution): > > 0.12 Tue Feb 12 12:12:12 PDT 2019 > added "d11" type which is base 11 with "012345679." (by > Randolf Richardson <randolf@richardson.tw>) which is > used to support the conversion of numbers that contain > periods to types such as Base 62 for uses such as > human-friendly URL encoding (the period can serve as a > delimiter in some interesting cases, and support for > multiple periods means complex version numbers can also > be encoded/decoded accurately); adding the "d11" type > required adding code to Convert.pm and Bases.pm. > > Thank you. >