1Algorithm::CheckDigits:U:sMe8r9_C0o0n1t(r3i)buted Perl DAolcguomreintthamt:i:oCnheckDigits::M89_001(3)
2
3
4

NAME

6       CheckDigits::M89_001 - compute check digits for VAT Registration Number
7       (LU)
8

SYNOPSIS

10         use Algorithm::CheckDigits;
11
12         $ustid = CheckDigits('ustid_lu');
13
14         if ($ustid->is_valid('13669580')) {
15               # do something
16         }
17
18         $cn = $ustid->complete('136695');
19         # $cn = '13669580'
20
21         $cd = $ustid->checkdigit('13669580');
22         # $cd = '80'
23
24         $bn = $ustid->basenumber('13669580');
25         # $bn = '136695'
26

DESCRIPTION

28   ALGORITHM
29       1.  The checksum is the whole number taken modulo 89.
30
31   METHODS
32       is_valid($number)
33           Returns true only if $number consists solely of numbers and the
34           last digit is a valid check digit according to the algorithm given
35           above.
36
37           Returns false otherwise,
38
39       complete($number)
40           The check digit for $number is computed and concatenated to the end
41           of $number.
42
43           Returns the complete number with check digit or '' if $number does
44           not consist solely of digits and spaces.
45
46       basenumber($number)
47           Returns the basenumber of $number if $number has a valid check
48           digit.
49
50           Return '' otherwise.
51
52       checkdigit($number)
53           Returns the checkdigit of $number if $number has a valid check
54           digit.
55
56           Return '' otherwise.
57
58   EXPORT
59       None by default.
60

AUTHOR

62       Mathias Weidner, "<mamawe@cpan.org>"
63

SEE ALSO

65       perl, CheckDigits, www.pruefziffernberechnung.de.
66
67
68
69perl v5.32.0                      2020-07-28Algorithm::CheckDigits::M89_001(3)
Impressum