Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: DANAJ [...] cpan.org
Cc:
AdminCc:

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



Subject: Bases have limitations that don't match documentation
The description of the module says "convert between arbitrary number bases from 2 (binary) thru 65535". This does not seem to be accurate. One of the documentation examples is: $converted = cnv($number,10 => 23); # dec to base23 $converted = cnv($number,23 => 5); # b23 to base5 But both of these error with "not a valid base: 23". The object method is similar: perl -E 'use Math::Base::Convert; my $bc = new Math::Base::Convert(10, 23); say $bc->(983274)' not a valid base: 23 at -e line 1. validbase() only accepts 2, 4, 8, 10, 16, and 64 as numeric bases. t/validbase.t even assures that 11 is rejected.
For bases not included in the distribution you must create the base map and pass it in. Take a look in useFROMbaseShortcuts.t in the test directory for examples of arbitrary bases. On Tue Aug 09 20:18:11 2016, DANAJ wrote: Show quoted text
> The description of the module says "convert between arbitrary number > bases from 2 (binary) thru 65535". This does not seem to be accurate. > > One of the documentation examples is: > > $converted = cnv($number,10 => 23); # dec to base23 > $converted = cnv($number,23 => 5); # b23 to base5 > > But both of these error with "not a valid base: 23". > > The object method is similar: > > perl -E 'use Math::Base::Convert; my $bc = new Math::Base::Convert(10, > 23); say $bc->(983274)' > not a valid base: 23 at -e line 1. > > validbase() only accepts 2, 4, 8, 10, 16, and 64 as numeric bases. > t/validbase.t even assures that 11 is rejected.