Algorithm-CheckDigits

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

CheckDigits v1.3.6
==================

This library provides several modules to compute or validate check
digits.

There is a executable script that may be used at the command line to
compute or validate check digits.

Further there is a sample CGI script that may be used to setup a web
service to validate check digits in your webbrowser.

INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install

lib/Algorithm/CheckDigits/M09_001.pm  view on Meta::CPAN

=item 3

This sum is taken modulo 9.

=item 4

The check digit is the difference between 8 and the number of step 3.

=back

To validate the last digit of the total of the digits of all numbers
inclusive check digit must be 8.

=head2 METHODS

=over 4

=item is_valid($number)

Returns true only if C<$number> consists solely of numbers and the last digit
is a valid check digit according to the algorithm given above.

lib/Algorithm/CheckDigits/M10_001.pm  view on Meta::CPAN


The sum of step 3 ist taken modulo 10.

=item 4

The check digit is the difference between 10 and the number from step
3.

=back

To validate the total of the digits of all numbers inclusive check
digit taken modulo 10 must be 0.

=head2 METHODS

=over 4

=item is_valid($number)

Returns true only if the last digit
is a valid check digit according to the algorithm given above.

lib/Algorithm/CheckDigits/M10_004.pm  view on Meta::CPAN

=item 3

The sum of step 3 ist taken modulo 10.

=item 4

The check digit is the difference between 10 and the number from step 3.

=back

To validate the total of the digits of all numbers inclusive check
digit taken modulo 10 must be 0.

=head2 METHODS

=over 4

=item is_valid($number)

Returns true only if C<$number> consists solely of digits, spaces and hyphen
and the last digit is a valid check digit according to the algorithm given

lib/Algorithm/CheckDigits/M11_003.pm  view on Meta::CPAN

The checkdigit is the multiple of the weight of the checkdigit where
the value of step 6 equals 10.

=item 8

If there can't be reached a value of 10 in step 6, the number cannot
be taken as a PKZ.

=back

To validate a PKZ apply steps 2 to 4 to the complete number.

=head2 METHODS

=over 4

=item is_valid($number)

Returns true only if C<$number> consists solely of numbers and the last digit
is a valid check digit according to the algorithm given above.



( run in 0.506 second using v1.01-cache-2.11-cpan-a5abf4f5562 )