r59468 - in /branches/upstream/libmath-basecnv-perl/current: BaseCnv.pm Build.PL CHANGES META.yml Makefile.PL README
carnil-guest at users.alioth.debian.org
carnil-guest at users.alioth.debian.org
Thu Jun 17 11:29:15 UTC 2010
Author: carnil-guest
Date: Thu Jun 17 11:28:51 2010
New Revision: 59468
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=59468
Log:
[svn-upgrade] new version libmath-basecnv-perl (1.6.A6FGHKE)
Modified:
branches/upstream/libmath-basecnv-perl/current/BaseCnv.pm
branches/upstream/libmath-basecnv-perl/current/Build.PL
branches/upstream/libmath-basecnv-perl/current/CHANGES
branches/upstream/libmath-basecnv-perl/current/META.yml
branches/upstream/libmath-basecnv-perl/current/Makefile.PL
branches/upstream/libmath-basecnv-perl/current/README
Modified: branches/upstream/libmath-basecnv-perl/current/BaseCnv.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmath-basecnv-perl/current/BaseCnv.pm?rev=59468&op=diff
==============================================================================
--- branches/upstream/libmath-basecnv-perl/current/BaseCnv.pm (original)
+++ branches/upstream/libmath-basecnv-perl/current/BaseCnv.pm Thu Jun 17 11:28:51 2010
@@ -1,9 +1,10 @@
-# 3159mLT - Math::BaseCnv.pm created by Pip Stuart <Pip at CPAN.Org> to CoNVert between arbitrary number Bases. I'm totally addicted to bass!
+# 3159mLT: Math::BaseCnv.pm created by Pip Stuart <Pip at CPAN.Org> to CoNVert between arbitrary number Bases. I'm totally addicted to bass!
package Math::BaseCnv;
require Exporter;
use strict;
use warnings;
use base qw(Exporter);
+use Math::BigInt;
use Memoize; memoize('summ'); memoize('fact'); memoize('choo');
# only export cnv() for 'use Math::BaseCnv;' && all other stuff optionally
our @EXPORT = qw(cnv ) ;
@@ -13,7 +14,7 @@
'b64' =>[ qw(cnv b10 b64 b64sort ) ],
'dig' =>[ qw( dig diginit) ],
'sfc' =>[ qw( summ fact choo) ] );
-our $VERSION = '1.4.75O6Pbr'; our $PTVR = $VERSION; $PTVR =~ s/^\d+\.\d+\.//; # Please see `perldoc Time::PT` for an explanation of $PTVR.
+our $VERSION = '1.6.A6FGHKE'; our $PTVR = $VERSION; $PTVR =~ s/^\d+\.\d+\.//; # Please see `perldoc Time::PT` for an explanation of $PTVR.
my $d2bs = ''; my %bs2d = (); my $nega = '';
my %digsets = (
'usr' => [], # this will be assigned if a dig(\@newd) call is made
@@ -23,8 +24,15 @@
'hex' => ['0'..'9', 'a'..'f'],
'HEX' => ['0'..'9', 'A'..'F'],
'b62' => ['0'..'9', 'a'..'z', 'A'..'Z'],
+ 'b64' => ['0'..'9', 'A'..'Z', 'a'..'z', '.', '_'], # month:C:12 day:V:31
'm64' => ['A'..'Z', 'a'..'z', '0'..'9', '+', '/'], # 0-63 from MIME::Base64
- 'b64' => ['0'..'9', 'A'..'Z', 'a'..'z', '.', '_'], # month:C:12 day:V:31
+ 'iru' => ['A'..'Z', 'a'..'z', '0'..'9', '[', ']'], # P10 server-server protocol used by IRCu daemon
+ 'url' => ['A'..'Z', 'a'..'z', '0'..'9', '*', '-'], # URL style which avoids %2B && %2F expansions of '+' && '/' respectively
+ 'rex' => ['A'..'Z', 'a'..'z', '0'..'9', '!', '-'], # Regular EXpression variant
+ 'id0' => ['A'..'Z', 'a'..'z', '0'..'9', '_', '-'], # IDentifier style 0
+ 'id1' => ['A'..'Z', 'a'..'z', '0'..'9', '.', '_'], # IDentifier style 1
+ 'xnt' => ['A'..'Z', 'a'..'z', '0'..'9', '.', '-'], # XML Name Tokens (Nmtoken)
+ 'xid' => ['A'..'Z', 'a'..'z', '0'..'9', '_', ':'], # XML identifiers (Name )
'b85' => ['0'..'9', 'A'..'Z', 'a'..'z', '!', '#', # RFC 1924 for IPv6 addresses, might need to return Math::BigInt objs
'$', '%', '&', '(', ')', '*', '+', '-', ';', '<', '=', '>', '?', '@', '^', '_', '`', '{', '|', '}', '~'],
);
@@ -35,24 +43,21 @@
if(ref $_[0]) { $d2bs = 'usr'; $digsets{$d2bs} = [ @{ shift() } ]; }
else { my $setn = shift(); return(-1) unless(exists $digsets{$setn}); $d2bs = $setn; }
diginit() unless(@{ $digsets{$d2bs} });
- bs2init();
-}
+ bs2init(); }
sub cnv__10 { # convert from some number base to decimal fast
- my $t = shift || '0'; my $s = shift || 64; my $n = 0;
+ my $t = shift || '0'; my $s = shift || 64; my $n = Math::BigInt->new();
$nega = ''; $nega = '-' if($t =~ s/^-//);
- foreach(split(//, $t)) { return(-1) unless(exists $bs2d{$_}); }
- while(length($t)) { $n += $bs2d{substr($t,0,1,'')}; $n *= $s; }
- return($nega . int($n / $s));
-}
+ for(split(//, $t)) { return(-1) unless(exists $bs2d{$_}); }
+ while(length($t)) { $n += $bs2d{substr($t,0,1,'')}; $n *= $s; }
+ return($nega . int($n / $s)); }
sub cnv10__ { # convert from decimal to some number base fast
- my $n = shift || 0; my $s = shift || 64; my $t = '';
+ my $n = Math::BigInt->new(shift || '0'); my $s = shift || 64; my $t = '';
return(-1) if($s > @{ $digsets{$d2bs} });
$nega = ''; $nega = '-' if($n =~ s/^-//);
while($n) { $t = $digsets{$d2bs}->[($n % $s)] . $t; $n = int($n / $s); }
if(length($t)) { $t = $nega . $t; }
else { $t = $digsets{$d2bs}->[0]; }
- return($t);
-}
+ return($t); }
sub dec { return(cnv__10(uc(shift), 16)); }#shortcut for hexadecimal -> decimal
sub hex { return(cnv10__( shift, 16)); }#shortcut for decimal -> hex
sub b10 { return(cnv__10( shift, 64)); }#shortcut for base64 -> decimal
@@ -77,28 +82,28 @@
return($numb);
}
sub summ { # simple function to calculate summation down to 1
- my $summ = shift; return(0) unless(defined($summ) && $summ && ($summ > 0)); my $answ = $summ; while(--$summ) { $answ += $summ; } return($answ);
+ my $summ = shift; return(0) unless(defined($summ) && $summ && ($summ > 0)); my $answ = Math::BigInt->new($summ);while(--$summ){$answ +=$summ;} return($answ);
}
sub fact { # simple function to calculate factorials
- my $fact = shift; return(0) unless(defined($fact) && $fact && ($fact > 0)); my $answ = $fact; while(--$fact) { $answ *= $fact; } return($answ);
+ my $fact = shift; return(0) unless(defined($fact) && $fact && ($fact > 0)); my $answ = Math::BigInt->new($fact);while(--$fact){$answ *=$fact;} return($answ);
}
sub choo { # simple function to calculate n choose m (i.e., (n! / (m! * (n - m)!)))
- my $ennn = shift; my $emmm = shift; return(0) unless(defined($ennn) && defined($emmm) && $ennn && $emmm && ($ennn != $emmm));
- ($ennn, $emmm) = ($emmm, $ennn) if($ennn < $emmm); my $diff = $ennn - $emmm; my $answ = fact($ennn); my $mfct = fact($emmm); my $dfct = fact($diff);
+ my $ennn = Math::BigInt->new(shift); my $emmm = Math::BigInt->new(shift);
+ return(0) unless(defined($ennn) && defined($emmm) && $ennn && $emmm && ($ennn != $emmm));
+ ($ennn, $emmm) = ($emmm, $ennn) if($ennn < $emmm); my $diff = Math::BigInt->new($ennn - $emmm); my $answ = Math::BigInt->new(fact($ennn));
+ my $mfct = Math::BigInt->new( fact( $emmm));my $dfct = Math::BigInt->new(fact($diff));
$mfct *= $dfct; return(0) unless($mfct);
$answ /= $mfct; return($answ);
}
diginit(); # initialize the Dflt digit set whenever BaseCnv is used
-
127;
-
=head1 NAME
Math::BaseCnv - fast functions to CoNVert between number Bases
=head1 VERSION
-This documentation refers to version 1.4.75O6Pbr of Math::BaseCnv, which was released on Thu May 24 06:25:37:53 2007.
+This documentation refers to version 1.6.A6FGHKE of Math::BaseCnv, which was released on Tue Jun 15 16:17:20:14 2010.
=head1 SYNOPSIS
@@ -187,8 +192,15 @@
'hex' => ['0'..'9', 'a'..'f']
'HEX' => ['0'..'9', 'A'..'F']
'b62' => ['0'..'9', 'a'..'z', 'A'..'Z']
+ 'b64' => ['0'..'9', 'A'..'Z', 'a'..'z', '.', '_']
'm64' => ['A'..'Z', 'a'..'z', '0'..'9', '+', '/'] # MIME::Base64
- 'b64' => ['0'..'9', 'A'..'Z', 'a'..'z', '.', '_']
+ 'iru' => ['A'..'Z', 'a'..'z', '0'..'9', '[', ']'] # IRCu
+ 'url' => ['A'..'Z', 'a'..'z', '0'..'9', '*', '-'] # URL
+ 'rex' => ['A'..'Z', 'a'..'z', '0'..'9', '!', '-'] # RegEx
+ 'id0' => ['A'..'Z', 'a'..'z', '0'..'9', '_', '-'] # ID 0
+ 'id1' => ['A'..'Z', 'a'..'z', '0'..'9', '.', '_'] # ID 1
+ 'xnt' => ['A'..'Z', 'a'..'z', '0'..'9', '.', '-'] # XML Nmtoken
+ 'xid' => ['A'..'Z', 'a'..'z', '0'..'9', '_', ':'] # XML ID Name
'b85' => ['0'..'9', 'A'..'Z', 'a'..'z', '!', '#', # RFC 1924 for
'$', '%', '&', '(', ')', '*', '+', '-', # IPv6 addrs
';', '<', '=', '>', '?', '@', '^', '_', # like in
@@ -267,6 +279,16 @@
=over 2
+=item - 1.6.A6FGHKE Tue Jun 15 16:17:20:14 2010
+
+* bumped minor version number so they'll keep ascending (without PT comprehension)
+
+=item - 1.4.A6FAbEb Tue Jun 15 10:37:14:37 2010
+
+* added Math::BigInt code for >64-bit number-base conversions
+
+* added a bunch more DigitSets: IRCu, URL, RegEx, identifier variants, XML Nmtoken, && XML ID Name
+
=item - 1.4.75O6Pbr Thu May 24 06:25:37:53 2007
* added Test::Pod(::Coverage)? tests && PREREQ entries
@@ -391,7 +413,7 @@
Most source code should be Free! Code I have lawful authority over is && shall be!
Copyright: (c) 2003-2007, Pip Stuart.
-Copyleft : This software is licensed under the GNU General Public License (version 2). Please consult the Free Software Foundation (HTTP://FSF.Org)
+Copyleft : This software is licensed under the GNU General Public License (version 3). Please consult the Free Software Foundation (HTTP://FSF.Org)
for important information about your freedom.
=head1 AUTHOR
Modified: branches/upstream/libmath-basecnv-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmath-basecnv-perl/current/Build.PL?rev=59468&op=diff
==============================================================================
--- branches/upstream/libmath-basecnv-perl/current/Build.PL (original)
+++ branches/upstream/libmath-basecnv-perl/current/Build.PL Thu Jun 17 11:28:51 2010
@@ -4,18 +4,20 @@
# 'module_name' => 'Math::BaseCnv',
'dist_name' => 'Math-BaseCnv',
# 'dist_version_from' => 'BaseCnv.pm',
- 'dist_version' => '1.4.75O6Pbr',
+ 'dist_version' => '1.6.A6FGHKE',
'dist_abstract' => 'fast functions to CoNVert between number Bases',
'dist_author' => 'Pip Stuart <Pip at CPAN.Org>',
# 'create_readme' => '1',
# 'create_makefile_pl' => '1', # 'traditional',
'license' => 'gpl',
'script_files' => {
+ 'bin/cnv' => '1',
},
'pm_files' => {
'BaseCnv.pm' => 'lib/Math/BaseCnv.pm',
},
'requires' => {
+ 'Math::BigInt' => '0',
'Memoize' => '0',
'Test' => '0',
'Test::Pod' => '0',
Modified: branches/upstream/libmath-basecnv-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmath-basecnv-perl/current/CHANGES?rev=59468&op=diff
==============================================================================
--- branches/upstream/libmath-basecnv-perl/current/CHANGES (original)
+++ branches/upstream/libmath-basecnv-perl/current/CHANGES Thu Jun 17 11:28:51 2010
@@ -1,5 +1,15 @@
CHANGES
Revision history for Perl extension Math::BaseCnv:
+
+ - 1.6.A6FGHKE Tue Jun 15 16:17:20:14 2010
+ * bumped minor version number so they'll keep ascending (without PT
+ comprehension)
+
+ - 1.4.A6FAbEb Tue Jun 15 10:37:14:37 2010
+ * added Math::BigInt code for >64-bit number-base conversions
+
+ * added a bunch more DigitSets: IRCu, URL, RegEx, identifier variants,
+ XML Nmtoken, && XML ID Name
- 1.4.75O6Pbr Thu May 24 06:25:37:53 2007
* added Test::Pod(::Coverage)? tests && PREREQ entries
Modified: branches/upstream/libmath-basecnv-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmath-basecnv-perl/current/META.yml?rev=59468&op=diff
==============================================================================
--- branches/upstream/libmath-basecnv-perl/current/META.yml (original)
+++ branches/upstream/libmath-basecnv-perl/current/META.yml Thu Jun 17 11:28:51 2010
@@ -1,12 +1,13 @@
--- #YAML:1.0
name: Math-BaseCnv
abstract: fast functions to CoNVert between number Bases
-version: 1.4.75O6Pbr
+version: 1.6.A6FGHKE
author:
- Pip Stuart <Pip at CPAN.Org>
license: gpl
distribution_type: module
requires:
+ Math::BigInt: 0
Memoize: 0
recommends:
build_requires:
@@ -18,4 +19,4 @@
meta-spec:
version: 1.3
url: HTTP://Module-Build.SourceForge.Net/META-spec-v1.3.html
-generated_by: e pkg v1.0.75L6d1c
+generated_by: e pkg v1.0.A2RJrKV
Modified: branches/upstream/libmath-basecnv-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmath-basecnv-perl/current/Makefile.PL?rev=59468&op=diff
==============================================================================
--- branches/upstream/libmath-basecnv-perl/current/Makefile.PL (original)
+++ branches/upstream/libmath-basecnv-perl/current/Makefile.PL Thu Jun 17 11:28:51 2010
@@ -3,12 +3,14 @@
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'Math::BaseCnv',
- 'VERSION' => '1.4.75O6Pbr',
+ 'VERSION' => '1.6.A6FGHKE',
'ABSTRACT' => 'fast functions to CoNVert between number Bases',
'AUTHOR' => 'Pip Stuart <Pip at CPAN.Org>',
'EXE_FILES' => [
+ 'bin/cnv',
],
'PREREQ_PM' => {
+ 'Math::BigInt' => 0,
'Memoize' => 0,
'Test' => 0,
'Test::Pod' => 0,
Modified: branches/upstream/libmath-basecnv-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmath-basecnv-perl/current/README?rev=59468&op=diff
==============================================================================
--- branches/upstream/libmath-basecnv-perl/current/README (original)
+++ branches/upstream/libmath-basecnv-perl/current/README Thu Jun 17 11:28:51 2010
@@ -1,9 +1,6 @@
-NAME
- Math::BaseCnv - fast functions to CoNVert between number Bases
-
VERSION
- This documentation refers to version 1.4.75O6Pbr of Math::BaseCnv, which
- was released on Thu May 24 06:25:37:53 2007.
+ This documentation refers to version 1.6.A6FGHKE of Math::BaseCnv, which
+ was released on Tue Jun 15 16:17:20:14 2010.
SYNOPSIS
use Math::BaseCnv;
@@ -97,8 +94,15 @@
'hex' => ['0'..'9', 'a'..'f']
'HEX' => ['0'..'9', 'A'..'F']
'b62' => ['0'..'9', 'a'..'z', 'A'..'Z']
+ 'b64' => ['0'..'9', 'A'..'Z', 'a'..'z', '.', '_']
'm64' => ['A'..'Z', 'a'..'z', '0'..'9', '+', '/'] # MIME::Base64
- 'b64' => ['0'..'9', 'A'..'Z', 'a'..'z', '.', '_']
+ 'iru' => ['A'..'Z', 'a'..'z', '0'..'9', '[', ']'] # IRCu
+ 'url' => ['A'..'Z', 'a'..'z', '0'..'9', '*', '-'] # URL
+ 'rex' => ['A'..'Z', 'a'..'z', '0'..'9', '!', '-'] # RegEx
+ 'id0' => ['A'..'Z', 'a'..'z', '0'..'9', '_', '-'] # ID 0
+ 'id1' => ['A'..'Z', 'a'..'z', '0'..'9', '.', '_'] # ID 1
+ 'xnt' => ['A'..'Z', 'a'..'z', '0'..'9', '.', '-'] # XML Nmtoken
+ 'xid' => ['A'..'Z', 'a'..'z', '0'..'9', '_', ':'] # XML ID Name
'b85' => ['0'..'9', 'A'..'Z', 'a'..'z', '!', '#', # RFC 1924 for
'$', '%', '&', '(', ')', '*', '+', '-', # IPv6 addrs
';', '<', '=', '>', '?', '@', '^', '_', # like in
@@ -186,6 +190,16 @@
CHANGES
Revision history for Perl extension Math::BaseCnv:
+ - 1.6.A6FGHKE Tue Jun 15 16:17:20:14 2010
+ * bumped minor version number so they'll keep ascending (without PT
+ comprehension)
+
+ - 1.4.A6FAbEb Tue Jun 15 10:37:14:37 2010
+ * added Math::BigInt code for >64-bit number-base conversions
+
+ * added a bunch more DigitSets: IRCu, URL, RegEx, identifier variants,
+ XML Nmtoken, && XML ID Name
+
- 1.4.75O6Pbr Thu May 24 06:25:37:53 2007
* added Test::Pod(::Coverage)? tests && PREREQ entries
@@ -287,7 +301,7 @@
LICENSE
Most source code should be Free! Code I have lawful authority over is &&
shall be! Copyright: (c) 2003-2007, Pip Stuart. Copyleft : This software
- is licensed under the GNU General Public License (version 2). Please
+ is licensed under the GNU General Public License (version 3). Please
consult the Free Software Foundation (HTTP://FSF.Org) for important
information about your freedom.
More information about the Pkg-perl-cvs-commits
mailing list