Algorithm-CheckDigits

 view release on metacpan or  search on metacpan

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


All products from step 1 and 2 are added.

=item 4

The check digit is the sum from step 3 modulo 23. This number is
expressed as the corresponding letter from the alphabet where A-V
correspond to 1-22 and W stands for check digit 0.

=back

=head2 METHODS

=over 4

=item is_valid($number)

Returns true only if C<$number> complies with the rules given above
and there is a valid check digit at position eight.

Returns false otherwise,

=item complete($number)

The check digit for C<$number> is computed and inserted at position eight
of C<$number>.

Returns the complete number with check digit or '' if C<$number>
does not consist solely of digits and an optional letter at position nine.

=item basenumber($number)

Returns the basenumber of C<$number> if C<$number> has a valid check
digit. As a placeholder for the checksum a point ('.') is inserted
at position eight when the checksum contains the optional letter
at position nine.

Return '' otherwise.

=item checkdigit($number)

Returns the checkdigit of C<$number> if C<$number> has a valid check
digit.

Return '' otherwise.

=back

=head2 EXPORT

None by default.

=head1 AUTHOR

Mathias Weidner, C<< <mamawe@cpan.org> >>

=head1 SEE ALSO

L<perl>,
L<CheckDigits>,
F<https://ec.europa.eu/taxation_customs/tin/>

=cut



( run in 2.732 seconds using v1.01-cache-2.11-cpan-df04353d9ac )