Skip to content
Snippets Groups Projects
Commit 04a27c00 authored by Jose Miguel Parrella's avatar Jose Miguel Parrella Committed by Andrius Merkys
Browse files

Import Debian changes 0.50-1

libalgorithm-checkdigits-perl (0.50-1) unstable; urgency=low
.
  * New upstream version (Closes: #495190)
parents 2b188d06 db536013
No related branches found
No related tags found
No related merge requests found
Revision history for Perl extension CheckDigits. Revision history for Perl extension CheckDigits.
0.50 Fr 6. Jun 21:45:04 CEST 2008
- put $VERSION back into CheckDigits.pm
0.49 Fr 16. Mai 22:54:43 CEST 2008
- CheckDigits/MXX_002.pm computes checkdigits for CAS registration
numbers with ten digits.
0.48 Di 9. Okt 01:07:02 CEST 2007 0.48 Di 9. Okt 01:07:02 CEST 2007
- keep VERSION in Makefile.PL - keep VERSION in Makefile.PL
......
...@@ -28,6 +28,8 @@ our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); ...@@ -28,6 +28,8 @@ our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = qw( CheckDigits ); our @EXPORT = qw( CheckDigits );
our $VERSION = '0.50';
my %methods = ( my %methods = (
'mbase-001' => 'Algorithm::CheckDigits::MBase_001', 'mbase-001' => 'Algorithm::CheckDigits::MBase_001',
'upc' => 'Algorithm::CheckDigits::MBase_001', 'upc' => 'Algorithm::CheckDigits::MBase_001',
......
...@@ -222,6 +222,7 @@ check number than using Math::BigInt. ...@@ -222,6 +222,7 @@ check number than using Math::BigInt.
L<perl>, L<perl>,
L<CheckDigits>, L<CheckDigits>,
F<www.pruefziffernberechnung.de>, F<www.pruefziffernberechnung.de>,
F<www.sic.ch/en/tkicch_home/tkicch_standardization/tkicch_financialinstitutions_ibanipi.htm>. F<www.sic.ch/en/tkicch_home/tkicch_standardization/
tkicch_financialinstitutions_ibanipi.htm>.
=cut =cut
# vim: set ts=4 sw=4 tw=78 et si:
package Algorithm::CheckDigits::MXX_002; package Algorithm::CheckDigits::MXX_002;
use 5.006; use 5.006;
...@@ -18,15 +19,15 @@ sub new { ...@@ -18,15 +19,15 @@ sub new {
sub is_valid { sub is_valid {
my ( $self, $number ) = @_; my ( $self, $number ) = @_;
if ($number =~ /^(\d{1,6}-?\d{2}-?)(\d)$/) { if ( $number =~ /^(\d{1,7}-?\d{2}-?)(\d)$/ ) {
return 1 if ( $2 == $self->_compute_checkdigit($1) ); return 1 if ( $2 == $self->_compute_checkdigit($1) );
} }
return '' return '';
} # is_valid() } # is_valid()
sub complete { sub complete {
my ( $self, $number ) = @_; my ( $self, $number ) = @_;
if ($number =~ /^\d{1,6}-?\d{2}-?$/) { if ( $number =~ /^\d{1,7}-?\d{2}-?$/ ) {
return $number . $self->_compute_checkdigit($number); return $number . $self->_compute_checkdigit($number);
} }
return ''; return '';
...@@ -34,7 +35,7 @@ sub complete { ...@@ -34,7 +35,7 @@ sub complete {
sub basenumber { sub basenumber {
my ( $self, $number ) = @_; my ( $self, $number ) = @_;
if ($number =~ /^(\d{1,6}-?\d{2}-?)(\d)$/) { if ( $number =~ /^(\d{1,7}-?\d{2}-?)(\d)$/ ) {
return $1 if ( $2 == $self->_compute_checkdigit($1) ); return $1 if ( $2 == $self->_compute_checkdigit($1) );
} }
return ''; return '';
...@@ -42,7 +43,7 @@ sub basenumber { ...@@ -42,7 +43,7 @@ sub basenumber {
sub checkdigit { sub checkdigit {
my ( $self, $number ) = @_; my ( $self, $number ) = @_;
if ($number =~ /^(\d{1,6}-?\d{2}-?)(\d)$/) { if ( $number =~ /^(\d{1,7}-?\d{2}-?)(\d)$/ ) {
return $2 if ( $2 == $self->_compute_checkdigit($1) ); return $2 if ( $2 == $self->_compute_checkdigit($1) );
} }
return ''; return '';
...@@ -161,11 +162,15 @@ Mathias Weidner, E<lt>mathias@weidner.in-bad-schmiedeberg.deE<gt> ...@@ -161,11 +162,15 @@ Mathias Weidner, E<lt>mathias@weidner.in-bad-schmiedeberg.deE<gt>
Aaron W. West pointed me to a fault in the computing of the check Aaron W. West pointed me to a fault in the computing of the check
digit. digit.
HERMIER Christophe made me aware that CAS is now assigning 10-digit CAS
Registry Numbers (F<http://www.cas.org/newsevents/10digitrn.html>)
=head1 SEE ALSO =head1 SEE ALSO
L<perl>, L<perl>,
L<CheckDigits>, L<CheckDigits>,
F<www.pruefziffernberechnung.de>, F<www.pruefziffernberechnung.de>,
F<www.cas.org> F<www.cas.org>
F<http://www.cas.org/expertise/cascontent/registry/checkdig.html>
=cut =cut
# http://module-build.sourceforge.net/META-spec.html # http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Algorithm-CheckDigits name: Algorithm-CheckDigits
version: 0.48 version: 0.50
version_from: version_from: CheckDigits.pm
installdirs: site installdirs: site
requires: requires:
......
...@@ -6,7 +6,7 @@ use ExtUtils::MakeMaker; ...@@ -6,7 +6,7 @@ use ExtUtils::MakeMaker;
# the contents of the Makefile that is written. # the contents of the Makefile that is written.
WriteMakefile( WriteMakefile(
'NAME' => 'Algorithm::CheckDigits', 'NAME' => 'Algorithm::CheckDigits',
'VERSION' => '0.48', 'VERSION_FROM' => 'CheckDigits.pm', # finds $VERSION
'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
($] >= 5.005 ? ## Add these new keywords supported since 5.005 ($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'CheckDigits.pm', # retrieve abstract from module (ABSTRACT_FROM => 'CheckDigits.pm', # retrieve abstract from module
......
libalgorithm-checkdigits-perl (0.50-1) unstable; urgency=low
* New upstream version (Closes: #495190)
-- Jose Parrella <bureado@debian.org> Sun, 30 Nov 2008 21:00:18 -0430
libalgorithm-checkdigits-perl (0.48-1) unstable; urgency=low libalgorithm-checkdigits-perl (0.48-1) unstable; urgency=low
* Initial Release. (Closes: #461628) * Initial Release. (Closes: #461628)
......
...@@ -4,7 +4,7 @@ Priority: optional ...@@ -4,7 +4,7 @@ Priority: optional
Build-Depends: debhelper (>= 5.0.0) Build-Depends: debhelper (>= 5.0.0)
Build-Depends-Indep: perl (>= 5.8.8-12) Build-Depends-Indep: perl (>= 5.8.8-12)
Maintainer: Jose Parrella <bureado@debian.org> Maintainer: Jose Parrella <bureado@debian.org>
Standards-Version: 3.7.3 Standards-Version: 3.8.0
Homepage: http://search.cpan.org/dist/Algorithm-CheckDigits/ Homepage: http://search.cpan.org/dist/Algorithm-CheckDigits/
Package: libalgorithm-checkdigits-perl Package: libalgorithm-checkdigits-perl
......
...@@ -219,8 +219,9 @@ use vars qw(@testcases); ...@@ -219,8 +219,9 @@ use vars qw(@testcases);
'2406055684D<6810203<0705109<4' ], '2406055684D<6810203<0705109<4' ],
# MXX-002 # MXX-002
[ 'cas', '1333-74-0', '1333-74-', '0', [ 'cas', '1333-74-0', '1333-74-', '0', '1333-74-1' ],
'1333-74-1' ], [ 'cas', '107-07-3', '107-07-', '3', '107-07-1' ],
[ 'cas', '1021205-92-4', '1021205-92-', '4', '1021205-92-1' ],
# MXX-003 # MXX-003
[ 'dem', 'GD0645027K1', 'GD0645027K', '1', [ 'dem', 'GD0645027K1', 'GD0645027K', '1',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment